jangada.serialization.Persistable._save_data_in_group#

static Persistable._save_data_in_group(key: str, value: Any, group: Group) None#

Recursively save data to an HDF5 group.

This method handles the conversion of Python objects to HDF5 structures, mapping different types to appropriate HDF5 storage (attributes, datasets, or subgroups).

Parameters:
keystr

The name/key for this data in the HDF5 group.

valueAny

The value to save.

grouph5py.Group

The HDF5 group to save into.

Raises:
TypeError

If the value type is not supported for HDF5 storage.

Notes

Type mapping: - None → attribute: ‘NoneType:None’ - Path → attribute: ‘Path:/absolute/path’ - str/Number → attribute: direct storage - list → subgroup with __container_type__ = ‘list’ - dict → subgroup with __container_type__ = ‘dict’ - dataset types → HDF5 dataset with __dataset_type__ attribute

Datasets are created with resizable first dimension (maxshape=(None, …)) to support appending, except for scalar datasets which cannot be resized.