Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/numpy/numpy
/ __array__
Method
__array__
numpy/core/tests/test_protocols.py:37–38 ·
view source on GitHub ↗
(self, result=None)
Source
from the content-addressed store, hash-verified
35
class
Wrapper:
36
val =
'0'
* 100
37
def
__array__(self, result=None):
38
return
np.array([self.val], dtype=object)
39
40
41
wrapped = Wrapper()
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected