slmsuite.misc.files.write_h5
- write_h5(file_path, data, mode='w')[source]
Write data in a dictionary to an h5 file.
Note
There are some limitations to what the h5 file standard can store, along with limitiations on what is currently implemented in this function. A few tips:
Supported types:
Nested dictionaries which are written as h5 group hierarchy,
None
(though this is written asFalse
),Uniform arrays of numeric or string data.
Example unsupported types:
Staggered arrays (an array consisting of arrays of different sizes),
Non-numeric or non-string data (e.g. object),
- Parameters
file_path (str) – Full path to the file to save the data in.
data (dict) – Dictionary of data to save in the file.
mode (str) – The mode to open the file with.