2.4.2. h5pywrappers.group.save

save(group, group_id, write_mode='w-')[source]

Save an HDF5 group to an HDF5 file.

Parameters:
grouph5py.Group | None

The HDF5 group of interest to save to an HDF5 file. If group is set to None, then an empty HDF5 group is to be saved.

group_idh5pywrappers.obj.ID

The parameter set specifying where to save the HDF5 group of interest.

write_mode“w” | “w-” | “a” | “a-”, optional

The write mode upon opening the HDF5 file to which to save the HDF5 group of interest: if write_mode is set to "w", then the target HDF5 file is emptied prior to saving the HDF5 group of interest; else if write_mode is set to "w-", then the HDF5 group of interest is saved unless a file already exists with the target filename, in which case an error is raised and the target HDF5 file is left unmodified; else if write_mode is set to "a-", then the HDF5 group of interest is saved unless an HDF5 object already exists at the target HDF5 path of the target HDF5 file, in which case an error is raised and the target HDF5 file is left unmodified; else if write_mode is set to "a", then the HDF5 group of interest is saved without emptying the target HDF5 file, replacing any HDF5 object at the target HDF5 path should one exist prior to saving.

Returns: