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

Method __new__

numpy/lib/tests/test_ufunclike.py:55–58  ·  view source on GitHub ↗
(cls, data, metadata=None)

Source from the content-addressed store, hash-verified

53 def test_fix_with_subclass(self):
54 class MyArray(nx.ndarray):
55 def __new__(cls, data, metadata=None):
56 res = nx.array(data, copy=True).view(cls)
57 res.metadata = metadata
58 return res
59
60 def __array_wrap__(self, obj, context=None):
61 if isinstance(obj, MyArray):

Callers

nothing calls this directly

Calls 1

viewMethod · 0.45

Tested by

no test coverage detected