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
0-d arrays can be indexed using the empty tuple:
>>> import numpy as np
>>> x = np.array({'x': 1})
>>> x
array({'x': 1}, dtype=object)
>>> x[()]
{'x': 1}
>>> type(x[()])
<type 'dict'>
Use mydict.item() to obtain the array element as a Python scalar.
>>> import numpy as np
>>> np.save('/tmp/data.npy',{'a':'Hi Mom!'})
>>> x=np.load('/tmp/data.npy')
>>> x.item()
{'a': 'Hi Mom!'}