wradlib.io.hdf.to_hdf5#
- wradlib.io.hdf.to_hdf5(fpath, data, *, mode='w', metadata=None, dataset='data', compression='gzip')[source]#
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. file[“data”]). See
from_hdf5
for retrieving stored data.- Parameters:
fpath (
str
or 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