MCPcopy Create free account
hub / github.com/numpy/numpy / __array__

Method __array__

numpy/typing/tests/data/pass/array_like.py:23–24  ·  view source on GitHub ↗
(self, dtype: None | np.dtype[Any] = None)

Source from the content-addressed store, hash-verified

21
22class A:
23 def __array__(self, dtype: None | np.dtype[Any] = None) -> np.ndarray:
24 return np.array([1, 2, 3])
25
26
27x13: ArrayLike = A()

Callers 3

flatiter.pyFile · 0.45
arrayterator.pyFile · 0.45
array_like.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected