update_attrs#

muse.utils.update_attrs(ds, source=None, **attrs)#

Copy source attributes and apply explicit updates.

Parameters:
  • ds (Dataset | DataArray) – Data whose attributes are updated in place.

  • source (Dataset | DataArray | None) – Data to copy attributes from.

  • **attrs – Attributes to add or update after source attributes are copied.

Return type:

None