Skip to content
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

Cannot create H5T_ARRAY attribute #955

Closed
anemes opened this issue Dec 5, 2017 · 2 comments
Closed

Cannot create H5T_ARRAY attribute #955

anemes opened this issue Dec 5, 2017 · 2 comments

Comments

@anemes
Copy link

anemes commented Dec 5, 2017

There is an existing hdf5 structure that I am trying to emulate with h5py.

In this, there is an attribute that h5dump reports as

            ATTRIBUTE "spacing" {
               DATATYPE  H5T_ARRAY { [3] H5T_IEEE_F32LE }
               DATASPACE  SCALAR
               DATA {
               (0): [ 13, 14, 15 ]
               }
            }

No matter how I pass the values [13,14,15] to .attrs.create or with what dtype, I do not end up with a DATATYPE H5T_ARRAY, but with DATATYPE H5T_IEEE_F32LE

            ATTRIBUTE "spacing" {
               DATATYPE  H5T_IEEE_F32LE
               DATASPACE  SIMPLE { ( 3 ) / ( 3 ) }
               DATA {
               (0): 13, 14, 15
               }
            }

Is there a way to force H5T_ARRAY attribute datatypes?

  • Operating System CentOS 7
  • Python version 3.5
  • SCL Python
  • h5py version 2.7.1
  • HDF5 version 1.8.18
@aragilar
Copy link
Member

aragilar commented Dec 5, 2017

There's no way to force the high-level interface to use a particular format, other than specifying dtype. I suggest using the low-level interface to create the attribute.

@anemes
Copy link
Author

anemes commented Dec 6, 2017

I didn't look deep enough into the documentation. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants