hdf5tojson fails for comp_complex.h5
jreadey opened this issue · 1 comments
jreadey commented
This file: data/hdf5/comp_complex contains a dataset with a type that it doesn't parse.
ajelenak commented
Two wrong conversions:
-
Committed datatype
/cmp3
h5dump
says:DATATYPE "cmp3" H5T_COMPOUND { H5T_ARRAY { [2] H5T_COMPOUND { H5T_COMPOUND { H5T_STD_I16LE "i"; H5T_STD_I32LE "j"; } "x"; H5T_ARRAY { [2] H5T_IEEE_F64LE } "y"; } } "yy"; }
NumPy dtype is:
dtype([('yy', [('x', {'names':['i','j'], 'formats':['<i2','<i4'], 'offsets':[0,4], 'itemsize':8}), ('y', '<f8', (2,))], (2,))])
h5tojson
says:"cf026426-9afc-11ec-8ed1-8c8590747994": { "alias": [ "/cmp3" ], "type": { "class": "H5T_OPAQUE", "size": 48 } }
-
Dataset
/phony_compound_var
h5dump
says:DATATYPE H5T_COMPOUND { H5T_ARRAY { [2] H5T_COMPOUND { H5T_COMPOUND { H5T_STD_I16LE "i"; H5T_STD_I32LE "j"; } "x"; H5T_ARRAY { [2] H5T_IEEE_F64LE } "y"; } } "yy"; } DATASPACE SIMPLE { ( 2 ) / ( 2 ) } DATA { (0): { [ { { 1, 200000 }, [ -100000, 3.14159 ] }, { { 2, 400000 }, [ 200000, 273.15 ] } ] }, (1): { [ { { 3, 600000 }, [ -200000, 6.14159 ] }, { { 4, 800000 }, [ 400000, 476.15 ] } ] } }
NumPy dtype is:
dtype([('yy', [('x', {'names':['i','j'], 'formats':['<i2','<i4'], 'offsets':[0,4], 'itemsize':8}), ('y', '<f8', (2,))], (2,))])
h5tojson
says:"cf02d74e-9afc-11ec-8ed1-8c8590747994": { "alias": [ "/phony_compound_var" ], "shape": { "class": "H5S_SIMPLE", "dims": [ 2 ] }, "type": { "class": "H5T_OPAQUE", "size": 48 }, "value": "????" }