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

Method _replace

xarray/core/variable.py:976–991  ·  view source on GitHub ↗
(
        self,
        dims=_default,
        data=_default,
        attrs=_default,
        encoding=_default,
    )

Source from the content-addressed store, hash-verified

974 return self._replace(data=ndata, attrs=attrs, encoding=encoding)
975
976 def _replace(
977 self,
978 dims=_default,
979 data=_default,
980 attrs=_default,
981 encoding=_default,
982 ) -> Self:
983 if dims is _default:
984 dims = copy.copy(self._dims)
985 if data is _default:
986 data = copy.copy(self._data)
987 if attrs is _default:
988 attrs = copy.copy(self._attrs)
989 if encoding is _default:
990 encoding = copy.copy(self._encoding)
991 return type(self)(dims, data, attrs, encoding, fastpath=True)
992
993 def load(self, **kwargs) -> Self:
994 """Trigger loading data into memory and return this variable.

Callers 13

drop_encodingMethod · 0.95
_copyMethod · 0.95
_shuffleMethod · 0.95
_shift_one_dimMethod · 0.95
_roll_one_dimMethod · 0.95
transposeMethod · 0.95
coarsenMethod · 0.95
test_replaceMethod · 0.95
_unstack_onceMethod · 0.45

Calls 2

typeFunction · 0.85
copyMethod · 0.45

Tested by 2

test_replaceMethod · 0.76