When I use either h5py visit or visititems, on the file h5ex_g_visit.h5 (downloaded from http://mirror.fcaglp.unlp.edu.ar/pub/ftp.hdfgroup.org/HDF5/examples/examples-by-api/files/exbyapi/h5ex_g_visit.h5 ) neither work as expected.
A simple program:
import h5py
def print_objs (name):
print (name)
fd = h5py.File('h5ex_g_visit.h5')
fd.visit(print_objs)
It prints
group1
group1/dset1
group1/group3
group1/group3/group4
group1/group3/group4/group1
group1/group3/group4/group2
I think it should print
group1
group1/dset1
group1/group3
group1/group3/dset2
group1/group3/group4
group1/group3/group4/group1
group1/group3/group4/group1/group5
group1/group3/group4/group2 group2
group2/dset2
group2/group4
group2/group4/group1
group2/group4/group1/group5
group2/group4/group1/group5/dset1
group2/group4/group1/group5/group3
group2/group4/group1/group2
You get the same missing objects when using visititems.
I looks like it finds the first group in a level and follows that path, without ever returning to pick up other groups and datasets in that level. It also doesn't seem to go below 4 levels.
This works correctly for the similar function in C.
Are these python methods, the HDF5 file, or me broken?
Running Fedora 31 and python 3.7.8. The h5py is version 2.10.0.
Thanks
Objects in the file: / (Group) /group1 (Group) /group1/dset1 (Dataset) /group1/group3 (Group) /group1/group3/group4 (Group) /group1/group3/group4/group1 (Group) /group1/group3/group4/group2 (Group)
Links in the file: /group1 (Group) /group1/dset1 (Dataset) /group1/group3 (Group) /group1/group3/dset2 (Dataset) /group1/group3/group4 (Group) /group1/group3/group4/group1 (Group) /group1/group3/group4/group1/group5 (Group) /group1/group3/group4/group2 (Group) /group2 (Group)
--
You received this message because you are subscribed to the Google Groups "h5py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h5py+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/h5py/90d5a910-cba2-44ba-8c92-042ff30d9d4bo%40googlegroups.com.