limix.io.hdf5.fetcher¶
-
class
limix.io.hdf5.
fetcher
(filename)[source]¶ Fetch datasets from HDF5 files.
Parameters: filename (str) – Filename to an HDF5 file. Examples
>>> from limix.io import hdf5 >>> from limix.example import file_example >>> from limix.sh import extract >>> >>> with file_example("data.h5.bz2") as filepath: ... filepath = extract(filepath, verbose=False) ... with hdf5.fetcher(filepath) as df: ... X = df.fetch('/group/dataset') ... print('%.4f' % X[0, 0].compute()) -0.0453
Methods
__init__
(filename)Initialize self. fetch
(data_path)Fetch a HDF5 dataset.