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

Method __new__

numpy/ma/tests/test_subclassing.py:52–55  ·  view source on GitHub ↗
(cls, info=None, **kwargs)

Source from the content-addressed store, hash-verified

50class SubMaskedArray(MaskedArray):
51 """Pure subclass of MaskedArray, keeping some info on subclass."""
52 def __new__(cls, info=None, **kwargs):
53 obj = super().__new__(cls, **kwargs)
54 obj._optinfo['info'] = info
55 return obj
56
57
58class MSubArray(SubArray, MaskedArray):

Callers

nothing calls this directly

Calls 1

__new__Method · 0.45

Tested by

no test coverage detected