fluiddyn.io.hdf5
IO for HDF5 files (fluiddyn.io.hdf5
)
- class fluiddyn.io.hdf5.H5File(name, mode='r', driver=None, libver=None, userblock_size=None, swmr=False, rdcc_nslots=None, rdcc_nbytes=None, rdcc_w0=None, track_order=None, fs_strategy=None, fs_persist=False, fs_threshold=1, fs_page_size=None, page_buf_size=None, min_meta_keep=0, min_raw_keep=0, locking=None, alignment_threshold=1, alignment_interval=1, meta_block_size=None, **kwds)[source]
Bases:
File
HDF5 file.
- fluiddyn.io.hdf5.save_variables_h5(path, variables, names=None)[source]
Save data in variables in the file path.
- Parameters:
- pathstr
Path of the file where the data are saved (has to end with ‘.py’).
- variablesdict
Contains the variables to be saved.
- namesNone or sequence of str.
If None, all variables in variables are saved, else, only the variables with name in names of the variables to be saved.
Examples
a = 1 b = 'str' c = np.ones(2) save_variables_h5('myfile.h5', locals(), ('a', 'b', 'c'))
or from a dictionary:
d = {'a': 1, 'b': 'str', 'c': np.ones(2)} save_variables_h5('myfile.h5', d)
Functions
|
Load files created with the function save_variables_h5. |
|
Save data in variables in the file path. |
Classes
|
HDF5 file. |