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

Method to_numpy

xarray/tests/arrays.py:64–66  ·  view source on GitHub ↗

Allow explicit conversions to numpy in `to_numpy`, but disallow np.asarray etc.

(self)

Source from the content-addressed store, hash-verified

62 return type(self)(self.array[key])
63
64 def to_numpy(self) -> np.ndarray:
65 """Allow explicit conversions to numpy in `to_numpy`, but disallow np.asarray etc."""
66 return self.array
67
68 def __array__(
69 self, dtype: np.typing.DTypeLike | None = None, /, *, copy: bool | None = None

Calls

no outgoing calls