MCPcopy
hub / github.com/pydata/xarray / to_numpy

Method to_numpy

xarray/namedarray/core.py:855–858  ·  view source on GitHub ↗

Coerces wrapped data to numpy and returns a numpy.ndarray

(self)

Source from the content-addressed store, hash-verified

853 return self._replace(data=data_chunked)
854
855 def to_numpy(self) -> np.ndarray[Any, Any]:
856 """Coerces wrapped data to numpy and returns a numpy.ndarray"""
857 # TODO an entrypoint so array libraries can choose coercion method?
858 return to_numpy(self._data)
859
860 def as_numpy(self) -> Self:
861 """Coerces wrapped data into a numpy array, returning a Variable."""

Callers 2

as_numpyMethod · 0.95
to_numpyFunction · 0.45

Calls 1

to_numpyFunction · 0.90

Tested by

no test coverage detected