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

Function _inplace_binary_method

numpy/lib/mixins.py:36–41  ·  view source on GitHub ↗

Implement an in-place binary method with a ufunc, e.g., __iadd__.

(ufunc, name)

Source from the content-addressed store, hash-verified

34
35
36def _inplace_binary_method(ufunc, name):
37 """Implement an in-place binary method with a ufunc, e.g., __iadd__."""
38 def func(self, other):
39 return ufunc(self, other, out=(self,))
40 func.__name__ = '__i{}__'.format(name)
41 return func
42
43
44def _numeric_methods(ufunc, name):

Callers 1

_numeric_methodsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected