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

Method __new__

numpy/core/tests/test_umath.py:195–196  ·  view source on GitHub ↗
(cls, arr)

Source from the content-addressed store, hash-verified

193 __array_priority__ = 10
194
195 def __new__(cls, arr):
196 return np.asarray(arr).view(cls).copy()
197
198 def __array_wrap__(self, arr, context):
199 return arr.view(type(self))

Callers 1

__new__Method · 0.45

Calls 2

copyMethod · 0.45
viewMethod · 0.45

Tested by

no test coverage detected