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?
Thanks