2.1.2. h5pywrappers.attr.save
- save(attr, attr_id, write_mode='-a')[source]
Save an HDF5 attribute to an HDF5 file.
- Parameters:
- attrany_type
The HDF5 attribute of interest to save to an HDF5 file.
- attr_id
h5pywrappers.attr.ID The parameter set specifying where to save the HDF5 attribute of interest.
- write_mode“a” | “a-”, optional
The write mode upon opening the HDF5 file to which to save the HDF5 attribute of interest: if
write_modeis set to"a-", then the HDF5 attribute of interest is saved without emptying the target HDF5 file unless an HDF5 attribute with the same name as the target attribute name 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 attribute 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: