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

Method _finalize_indexing_result

xarray/core/variable.py:2824–2829  ·  view source on GitHub ↗
(self, dims, data)

Source from the content-addressed store, hash-verified

2822 return self.copy(deep=False)
2823
2824 def _finalize_indexing_result(self, dims, data):
2825 if getattr(data, "ndim", 0) != 1:
2826 # returns Variable rather than IndexVariable if multi-dimensional
2827 return Variable(dims, data, self._attrs, self._encoding)
2828 else:
2829 return self._replace(dims=dims, data=data)
2830
2831 def __setitem__(self, key, value):
2832 raise TypeError(f"{type(self).__name__} values cannot be modified")

Callers

nothing calls this directly

Calls 2

VariableClass · 0.70
_replaceMethod · 0.45

Tested by

no test coverage detected