-
Notifications
You must be signed in to change notification settings - Fork 26
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
Error when opening a HDF5 Dataset with np.ndarray #202
Comments
I tried the same HDF5 dataset with HDF Compass v0.6.0 and it worked. Since you mentioned np.ndarray, I also tried with Python 3.6.9. Below is ipython output: In [1]: import h5py
In [2]: h5py.version.version
Out[2]: '2.10.0'
In [3]: h5py.version.hdf5_version
Out[3]: '1.10.4'
In [4]: f = h5py.File('Canada_Population.h5', 'r')
In [5]: labels = f['/Record/Labels/Values']
In [6]: labels.shape
Out[6]: (1,)
In [7]: labels.dtype
Out[7]: dtype([('Country', 'O', (1,)), ('Continent', 'O', (1,)), ('Abbreviation', 'O', (1,)), ('Language', 'O', (2,)), ('DataSource', 'O', (1,))])
In [8]: labels[0]
Segmentation fault: 11 The reported stack trace indicates the segmentation fault happened during conversion of the dataset's data to NumPy memory structures by h5py:
h5dump description of the the dataset's datatype is:
which in my opinion is a bit unconventional. I'd suggest simplifying some of the compound fields if interoperability of this file format is important. |
When I try to open an HDF5 Dataset with np.ndarray the application quit unexpectedly with no errors. I have python 2.7 installed.
See DataFile and screenshots.
Canada_Population.h5.zip
The text was updated successfully, but these errors were encountered: