Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
22
class
A:
23
def
__array__(self, dtype: None | np.dtype[Any] = None) -> np.ndarray:
24
return
np.array([1, 2, 3])
25
26
27
x13: ArrayLike = A()
Callers
3
flatiter.py
File · 0.45
arrayterator.py
File · 0.45
array_like.py
File · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected