-
-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8-bit enum type support? #1035
Comments
Dear @d-chambers. |
Hi @avalentino, Sure here is a file with a script to reproduce the warnings. Thanks! |
Hey @avalentino, did you have a chance to take a look at this yet? Anything I can do to help? Thanks! |
Dear @d-chambers, If my understanding is correct it should be possible to address the issue using the EnumAtom. |
I haven't yet but I will look at it later today. I can certainly define the Enum so it matches the info in HDF5 viewer but what isn't clear is if I need to plug it in somewhere so when I read an existing file pytables knows about it? |
Ok, I played around with this a bit. It was easy to define an EnumAtom which looks right based on the output from hdf5viewer. However, I still need some guidance on how to get pytables to recognize the enum atom when it reads files because these warnings are issued when calling When I filter the python warnings to raise an Error I see this TypeError from utilsextension.pyx:
Any advice on where to go from here? |
OK, the problem seems to be a little bit more complex that expected. Probably a quick patch to return the integer value representing the enum could be relatively easy to implement but a more complete solution would require a more careful design. Any idea is very welcome. |
It looks like h5py just returns the enum value (e.g, False/True). Is there a reason that would be undesirable? |
It would be OK for the reading part, but it is not sufficient for writing. By the way just having the reading part with the enums would be a great starting point. |
Sure. I am on vacation the rest of this week but I will pick it up next week. |
Hello,
I am using pytables to read an HDF5 file created by another program. These files use 8-bit enums to indicate True (1) and False (0) values. Pytables doesn't like this, and I get hundreds of warnings like the following:
Looking at it in HDF5Viewer, these attributes look like this:
Is there a way to make these warnings go away, or, better yet, register this simple enum type so pytables can read in the correct boolean values?
Thanks!
The text was updated successfully, but these errors were encountered: