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

Method async_get_duck_array

xarray/core/indexing.py:771–780  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

769 return _wrap_numpy_scalars(array)
770
771 async def async_get_duck_array(self):
772 from xarray.backends.common import BackendArray
773
774 if isinstance(self.array, BackendArray):
775 array = await self.array.async_getitem(self.key)
776 else:
777 array = apply_indexer(self.array, self.key)
778 if isinstance(array, ExplicitlyIndexed):
779 array = await array.async_get_duck_array()
780 return _wrap_numpy_scalars(array)
781
782 def transpose(self, order):
783 return LazilyVectorizedIndexedArray(self.array, self.key).transpose(order)

Callers

nothing calls this directly

Calls 4

apply_indexerFunction · 0.90
_wrap_numpy_scalarsFunction · 0.85
async_getitemMethod · 0.45
async_get_duck_arrayMethod · 0.45

Tested by

no test coverage detected