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

Method _check_shape

xarray/namedarray/core.py:532–537  ·  view source on GitHub ↗
(self, new_data: duckarray[Any, _DType_co])

Source from the content-addressed store, hash-verified

530 self._attrs = dict(value) if value else None
531
532 def _check_shape(self, new_data: duckarray[Any, _DType_co]) -> None:
533 if new_data.shape != self.shape:
534 raise ValueError(
535 f"replacement data must match the {self.__class__.__name__}'s shape. "
536 f"replacement data has shape {new_data.shape}; {self.__class__.__name__} has shape {self.shape}"
537 )
538
539 @property
540 def data(self) -> duckarray[Any, _DType_co]:

Callers 3

_copyMethod · 0.95
dataMethod · 0.95
dataMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected