wradlib.io.hdf.to_hdf5¶
- wradlib.io.hdf.to_hdf5(fpath, data, mode='w', metadata=None, dataset='data', compression='gzip')¶
Quick storage of one <data> array and a <metadata> dict in an hdf5 file
This is more efficient than pickle, cPickle or numpy.save. The data is stored in a subgroup named
data(i.e. hdf5file[“data”). Seefrom_hdf5for retrieving stored data.- Parameters:
fpath (
stror file-like) – path to the hdf5 file or file-like objectdata (
numpy.ndarray)mode (
str) – file open mode, defaults to “w” (create, truncate if exists)metadata (
dict) – dictionary of data’s attributesdataset (
str) – describing datasetcompression (
str) – h5py compression type {“gzip”|”szip”|”lzf”}, see h5py documentation for details