Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/numpy/numpy
/ __new__
Method
__new__
numpy/core/tests/test_arrayprint.py:43–45 ·
view source on GitHub ↗
(cls, inp)
Source
from the content-addressed store, hash-verified
41
def
test_object_subclass(self):
42
class
sub(np.ndarray):
43
def
__new__(cls, inp):
44
obj = np.asarray(inp).view(cls)
45
return
obj
46
47
def
__getitem__(self, ind):
48
ret = super().__getitem__(ind)
Callers
nothing calls this directly
Calls
1
view
Method · 0.45
Tested by
no test coverage detected