gonum / hdf5

hdf5 is a wrapper for the HDF5 library
BSD 3-Clause "New" or "Revised" License
131 stars 33 forks source link

Is there a way to know the type of the object without trying to open first? #77

Closed dcu closed 3 years ago

dcu commented 3 years ago

What are you trying to do?

I'm reading this file: https://github.com/rcmalli/keras-vggface/releases/download/v2.0/rcmalli_vggface_tf_notop_resnet50.h5

What did you do?

What did you expect to happen?

What actually happened?

I'm using a code based on the code listed in #76 to read the file listed above, the problem is that this file has group inside group but I always try to read datasets inside groups so it fails. Is there a way to know that the object is a group or dataset?

What I did to solve this was attempting to open a group first if it fails it attempts to open a dataset but I wonder if there's a cleaner way to do this

What version of Go, Gonum, Gonum/netlib and libhdf5 are you using?

gonum.org/v1/hdf5: master go version: 1.16

Does this issue reproduce with the current master?

yes

sbinet commented 3 years ago

you're right, there's currently no way to do what you want.

78 may help, though.