Module ml4opf.parsers.read_hdf5
This file gives an example implementation of how to read an entire HDF5 into a Python dictionary.
Note that if only using a subset of the data, it is better to use the h5py.File
interface directly since it avoids reading unnecessary data from disk.
Functions
def parse_hdf5(path, preserve_shape=False)-
Parse an HDF5 file into a dictionary.
Args
path:str- Path to the HDF5 file.
preserve_shape:bool, optional- Whether to preserve the shape of the data. Defaults to False.
Returns
dict- Dictionary containing the data from the HDF5 file.