Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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')
 
PREVIOUS NEXT
Tagged: #save #dictionary #file #numpy
ADD COMMENT
Topic
Name
4+9 =