MCPcopy
hub / github.com/numpy/numpy / __array_wrap__

Method __array_wrap__

numpy/ma/tests/test_subclassing.py:152–157  ·  view source on GitHub ↗
(self, obj, context=None, return_scalar=False)

Source from the content-addressed store, hash-verified

150 y[:] = value
151
152 def __array_wrap__(self, obj, context=None, return_scalar=False):
153 obj = super().__array_wrap__(obj, context, return_scalar)
154 if context is not None and context[0] is np.multiply:
155 obj.info['multiplied'] = obj.info.get('multiplied', 0) + 1
156
157 return obj
158
159
160class WrappedArray(NDArrayOperatorsMixin):

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected