Open tmick0 opened 6 years ago
Hi, it looks like the test coverage for enum types is pretty thin - we'll want to beef this up.
I'm a bit confused just using h5py with your HDF5 file.
If I do this:
f = h5py.File("test.h5", 'r')
dset = f['test']
print(dset.dtype)
dt = dset.dtype["my_enum_array"]
print("enum dt: {}".format(dt))
print(h5py.check_dtype(enum=dt))
I'm getting "None" for the last output line. Is this what you see?
Yes, it seems that the metadata is lost if we access it that way. However, if I write f['test']['my_enum_array'].dtype.metadata
(or equivalently, h5py.check_dtype(enum=f['test']['my_enum_array'].dtype)
), the enum dictionary is retrieved as expected. This is pretty confusing behavior indeed.
I am trying to access a dataset which contains an enum array via h5serv, however h5pyd throws the following exception:
We can create a minimal dataset to reproduce the error using h5py as follows:
We then put it in h5serv's data directory and try to access it:
This yields the above exception. Note that we are able to access the dataset as expected using regular h5py.
Applying the following patch to h5pyd prevents the exception and returns a dataframe, however it doesn't seem to give the correct behavior (the enum array seems to be treated as an int array):
I'm not sure how to properly proceed in working around this. Thanks in advance for your advice.