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

Method _copy

xarray/core/indexes.py:950–959  ·  view source on GitHub ↗
(
        self: T_PandasIndex, deep: bool = True, memo: dict[int, Any] | None = None
    )

Source from the content-addressed store, hash-verified

948 return self._replace(index, dim=new_dim)
949
950 def _copy(
951 self: T_PandasIndex, deep: bool = True, memo: dict[int, Any] | None = None
952 ) -> T_PandasIndex:
953 if deep:
954 # pandas is not using the memo
955 index = self.index.copy(deep=True)
956 else:
957 # index will be copied in constructor
958 index = self.index
959 return self._replace(index)
960
961 def __getitem__(self, indexer: Any):
962 return self._replace(self.index[indexer])

Callers 1

copy_indexesMethod · 0.95

Calls 2

_replaceMethod · 0.95
copyMethod · 0.45

Tested by

no test coverage detected