Storing a list of strings to a HDF5 Dataset from Python -
I am trying to store a variable length list of strings on the HDF 5 dataset. The code for this is
import h5py h5File = h5py.file ('xxx.h5', 'w') strList = ['asas',' asas', 'asas]] h5File I An error is saying that "xxx" ('lex', '1'), 's10', strilist) h5File.flush () h5File.Close () TypeError : There is no conversion path for dtype: dtype ('& amp; amp; U5 lt U3)' where & amp; Amp; LT is less than the actual symbol
How can I solve this problem
You can unicode Studying in strings, but specifying their datatype as ASCII. According to, the h5py does not currently support this conversion.
Note: You must encode the string in a format h5py handle:
asciiList = [n.encode (" Note: Not everything, but it's also, can be encoded in ATCI!
Comments
Post a Comment