Loading hdf5 matlab strings into Python

后端 未结 2 868

I\'m running into trouble reading a hdf5 matlab 7.3 file with Python. I\'m using h5py 2.0.1.

I can read all the matrices that are stored in the file, but I can not r

2条回答
  •  不思量自难忘°
    2021-01-18 08:32

    You can get the original Matlab class name of Group and Dataset objects by

    dataset.attrs['MATLAB_class']
    

    if dataset contains a string, it will return b'char'.

提交回复
热议问题