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

Method __array_wrap__

numpy/ma/tests/test_subclassing.py:143–148  ·  view source on GitHub ↗
(self, obj, context=None)

Source from the content-addressed store, hash-verified

141 y[:] = value
142
143 def __array_wrap__(self, obj, context=None):
144 obj = super().__array_wrap__(obj, context)
145 if context is not None and context[0] is np.multiply:
146 obj.info['multiplied'] = obj.info.get('multiplied', 0) + 1
147
148 return obj
149
150
151class WrappedArray(NDArrayOperatorsMixin):

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected