add_history#
- muse.utils.add_history(ds, func_or_local_vars, func=None)#
Record a call in the dataset history and store its keyword inputs as attributes.
When
locals()andfuncare passed, every keyword input (a parameter offuncthat has a default) is stored onds.attrsafter being coerced to a netCDF/zarr-serializable form (see_attr_safe); required positional parameters such as the data itself are skipped.- Parameters:
- Return type: