2.2.2. h5pywrappers.dataset.save
- save(dataset, dataset_id, write_mode='w-')[source]
Save an HDF5 dataset to an HDF5 file.
- Parameters:
- dataset
h5py.Dataset| array_like | str The HDF5 dataset of interest to save to an HDF5 file.
- dataset_id
h5pywrappers.obj.ID The parameter set specifying where to save the HDF5 dataset of interest.
- write_mode“w” | “w-” | “a” | “a-”, optional
The write mode upon opening the HDF5 file to which to save the HDF5 dataset of interest: if
write_modeis set to"w", then the target HDF5 file is emptied prior to saving the HDF5 dataset of interest; else ifwrite_modeis set to"w-", then the HDF5 dataset 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 ifwrite_modeis set to"a-", then the HDF5 dataset 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 ifwrite_modeis set to"a", then the HDF5 dataset 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.
- dataset
- Returns: