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

Method __array_ufunc__

numpy/core/tests/test_multiarray.py:3961–3968  ·  view source on GitHub ↗
(self, ufunc, method, *inputs, **kw)

Source from the content-addressed store, hash-verified

3959 # This also checks implicitly that 'out' is always a tuple.
3960 class CheckIndex:
3961 def __array_ufunc__(self, ufunc, method, *inputs, **kw):
3962 for i, a in enumerate(inputs):
3963 if a is self:
3964 return i
3965 # calls below mean we must be in an output.
3966 for j, a in enumerate(kw['out']):
3967 if a is self:
3968 return (j,)
3969
3970 a = CheckIndex()
3971 dummy = np.arange(2.)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected