Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Python interfaces to HDF5 include h5py and pytables (for which the module name is tables). While we actively use and support h5py, we will not discuss pytables as it is not a tool that we presently work with.

H5py

Many of our datasets are one dimensional arrays of a compound type. A compound type is a well defined object in the HDF5 library - it is very much like a C struct. In hdfview (a useful tool for viewing hdf5 files provided by the hdf5 group) they often look like two dimensional arrays, but the columns are really the field names of the compound type. When you load a dataset into h5py, it will return a  numpy array (with extra metadata attached) that is close to the original hdf5 layout.  It will be a 1D array with a numpy dtype that exactly represents the compound type in the hdf5 file.

...