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

Method __new__

numpy/core/tests/test_regression.py:1111–1115  ·  view source on GitHub ↗
(cls, data, info)

Source from the content-addressed store, hash-verified

1109 # Ticket #791
1110 class TestArray(np.ndarray):
1111 def __new__(cls, data, info):
1112 result = np.array(data)
1113 result = result.view(cls)
1114 result.info = info
1115 return result
1116
1117 def __array_finalize__(self, obj):
1118 self.info = getattr(obj, 'info', '')

Callers

nothing calls this directly

Calls 1

viewMethod · 0.45

Tested by

no test coverage detected