frejanordsiek / hdf5storage

Python package to read and write a wide range of Python types to/from HDF5 formatted files. Can read/write data to the HDF5 based Matlab v7.3 MAT files.
BSD 2-Clause "Simplified" License
82 stars 24 forks source link

some numpy dtype types were missing from the NumpyScalarArrayMarshaller #119

Open danielhrisca opened 2 years ago

danielhrisca commented 2 years ago

Some of the numpy scalar types were missing. This resulted in error messages such as the following

File "D:\TMP\myapp_venv_3.9\lib\site-packages\hdf5storage\__init__.py", line 1676, in savemat
    writes(mdict=mdict, filename=file_name,
  File "D:\TMP\myapp_venv_3.9\lib\site-packages\hdf5storage\__init__.py", line 1316, in writes
    lowlevel.write_data(f, grp, targetname, data,
  File "D:\TMP\myapp_venv_3.9\lib\site-packages\hdf5storage\lowlevel.py", line 114, in write_data
    m.write(f, grp, name, data, type_string, options)
  File "D:\TMP\myapp_venv_3.9\lib\site-packages\hdf5storage\Marshallers.py", line 589, in write
    raise lowlevel.TypeNotMatlabCompatibleError( \
hdf5storage.lowlevel.TypeNotMatlabCompatibleError: Data type uint32 not supported by MATLAB.

because the input array had the typer numpy.uintc which was not found in the mapping.