Answers for "save dictionary to file numpy"

0

save dictionary to file numpy

import numpy as np

d1={'key1':[5,10], 'key2':[50,100]}
np.save("d1.npy", d1)
d2=np.load("d1.npy")
print d1.get('key1')
print d2.item().get('key2')
Posted by: Guest on March-21-2021

Python Answers by Framework

Browse Popular Code Answers by Language