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

Method __new__

numpy/lib/tests/test_function_base.py:3912–3915  ·  view source on GitHub ↗
(cls, input_array, info=None)

Source from the content-addressed store, hash-verified

3910 class MySubClass(np.ndarray):
3911
3912 def __new__(cls, input_array, info=None):
3913 obj = np.asarray(input_array).view(cls)
3914 obj.info = info
3915 return obj
3916
3917 def mean(self, axis=None, dtype=None, out=None):
3918 return -7

Callers

nothing calls this directly

Calls 1

viewMethod · 0.45

Tested by

no test coverage detected