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

Method set_attribute

xarray/backends/scipy_.py:319–322  ·  view source on GitHub ↗
(self, key: str, value: Any)

Source from the content-addressed store, hash-verified

317 raise ValueError("Not a valid attribute name")
318
319 def set_attribute(self, key: str, value: Any) -> None:
320 self._validate_attr_key(key)
321 value = encode_nc3_attr_value(value)
322 setattr(self.ds, key, value)
323
324 def encode_variable(self, variable: Variable, name: str | None = None) -> Variable:
325 variable = encode_nc3_variable(variable, name=name)

Callers

nothing calls this directly

Calls 2

_validate_attr_keyMethod · 0.95
encode_nc3_attr_valueFunction · 0.90

Tested by

no test coverage detected