Closed jeremypriest closed 1 year ago
This is fixed in the a06c749b970d012256311ba0b95321ac83cae0ec commit on the 0.1.x branch. It is caused by the numpy.asscalar
function being deprecated, which prevented reading the value (it was saved, though). I will be pushing a 0.1.19 bugfix release to PyPI shortly.
Note: I wrote all of the below out, and then realized that it appears this issue has been fixed on the main branch. A release of the main branch would be much appreciated.
hdf5storage 0.1.18 is affected by some sort of change in NumPy 1.23. If a python float or int is saved out, it will not be read back in during
loadmat()
. When it is saved out as a np.float32/64 or np.int32/64, the variable is loaded in properly.Here is the code example I'm using:
Output under NumPy 1.23.3:
Output under NumPy 1.22.4:
Output under NumPy 1.23.3 and hdf5storage main branch (commit ec2e1e34789ad27713b860eb4de5da99817fa315):