El dt 03 de 07 del 2007 a les 11:26 +0200, en/na Alain Fagot va escriure: > Hi All, > > > > I have noticed something strange while retrieving _v_objectID > attribute of nodes of a dataset. > > The objected(s) returned from pyTables program are slightly different > than objectID(s) displayed from a hdf5dump.exe of the same dataset.
Yes. This is expected. The objectID does have the same value than the HDF5 calls H5Gcreate(), H5Gopen(), H5Dcreate() or H5Dopen() returns. Unfortunately, these calls are not guaranteed to return the same on every call of H5Dcreate() or H5Dopen(). The HDF5 manual entry for H5Dopen() claims: """ Returns a dataset identifier if successful; otherwise returns a negative value. """ As you see, this tells nothing about retaining the same value from opening to opening. What can be misleading is the PyTables manual entry: """ _v_objectID The identifier of this node in the hosting HDF5 file. """ which is clearly incorrect. I'll change this by something like: """ _v_objectID The dataset identifier (may change from run to run). """ If you want to keep a *unique* identifier of a dataset that remains the same from run to run, you may want to use: node._v_pathname (or a hash of it, in case you want a numerical value). Cheers, -- Francesc Altet | Be careful about using the following code -- Carabos Coop. V. | I've only proven that it works, www.carabos.com | I haven't tested it. -- Donald Knuth ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Pytables-users mailing list Pytables-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pytables-users