What happened is that I (by mistake) saved a dictionary with the command numpy.save() (no error messages shown) and now I need to recover the data in the dictio
numpy.save()
Use mydict.item() to obtain the array element as a Python scalar.
mydict.item()
>>> import numpy as np >>> np.save('/tmp/data.npy',{'a':'Hi Mom!'}) >>> x=np.load('/tmp/data.npy') >>> x.item() {'a': 'Hi Mom!'}