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

Method __init__

xarray/core/variable.py:2764–2771  ·  view source on GitHub ↗
(self, dims, data, attrs=None, encoding=None, fastpath=False)

Source from the content-addressed store, hash-verified

2762 _data: PandasIndexingAdapter # type: ignore[assignment]
2763
2764 def __init__(self, dims, data, attrs=None, encoding=None, fastpath=False):
2765 super().__init__(dims, data, attrs, encoding, fastpath)
2766 if self.ndim != 1:
2767 raise ValueError(f"{type(self).__name__} objects must be 1-dimensional")
2768
2769 # Unlike in Variable, always eagerly load values into memory
2770 if not isinstance(self._data, PandasIndexingAdapter):
2771 self._data = PandasIndexingAdapter(self._data)
2772
2773 def __dask_tokenize__(self) -> object:
2774 from dask.base import normalize_token

Callers

nothing calls this directly

Calls 3

typeFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected