MCPcopy Index your code
hub / github.com/pydata/xarray / _put_attrs

Function _put_attrs

xarray/backends/zarr.py:646–652  ·  view source on GitHub ↗

Raise a more informative error message for invalid attrs.

(zarr_obj, attrs)

Source from the content-addressed store, hash-verified

644
645
646def _put_attrs(zarr_obj, attrs):
647 """Raise a more informative error message for invalid attrs."""
648 try:
649 zarr_obj.attrs.put(attrs)
650 except TypeError as e:
651 raise TypeError("Invalid attribute in Dataset.attrs.") from e
652 return zarr_obj
653
654
655class ZarrStore(AbstractWritableDataStore):

Callers 2

set_attributesMethod · 0.85
_create_new_arrayMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…