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

Method __new__

numpy/core/tests/test_multiarray.py:6417–6421  ·  view source on GitHub ↗
(cls, data, info)

Source from the content-addressed store, hash-verified

6415 def test_subclass(self):
6416 class TestArray(np.ndarray):
6417 def __new__(cls, data, info):
6418 result = np.array(data)
6419 result = result.view(cls)
6420 result.info = info
6421 return result
6422
6423 def __array_finalize__(self, obj):
6424 self.info = getattr(obj, "info", '')

Callers

nothing calls this directly

Calls 1

viewMethod · 0.45

Tested by

no test coverage detected