Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/numpy/numpy
/ __array__
Method
__array__
numpy/lib/user_array.py:39–42 ·
view source on GitHub ↗
(self, t=None)
Source
from the content-addressed store, hash-verified
37
return
self.__class__.__name__ +
"("
+ repr(self.array) +
")"
38
39
def
__array__(self, t=None):
40
if
t:
41
return
self.array.astype(t)
42
return
self.array
43
44
# Array as sequence
45
def
__len__(self):
Callers
nothing calls this directly
Calls
1
astype
Method · 0.80
Tested by
no test coverage detected