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

Function func

numpy/lib/mixins.py:18–21  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

16def _binary_method(ufunc, name):
17 """Implement a forward binary method with a ufunc, e.g., __add__."""
18 def func(self, other):
19 if _disables_array_ufunc(other):
20 return NotImplemented
21 return ufunc(self, other)
22 func.__name__ = '__{}__'.format(name)
23 return func
24

Callers 15

apply_along_fieldsFunction · 0.70
newfuncMethod · 0.70
piecewiseFunction · 0.70
_get_ufunc_and_otypesMethod · 0.70
_funcMethod · 0.70
_vectorize_callMethod · 0.70
_ureduceFunction · 0.70
apply_over_axesFunction · 0.70
updateMethod · 0.70
_scalarfuncMethod · 0.70
_interpret_codeMethod · 0.50

Calls 2

_disables_array_ufuncFunction · 0.85
ufuncClass · 0.85

Tested by 15

test_one_arg_funcsMethod · 0.40
test_two_arg_funcsMethod · 0.40
test_three_arg_funcsMethod · 0.40
test_one_arg_funcsMethod · 0.40
test_two_arg_funcsMethod · 0.40
test_integersMethod · 0.40
test_three_arg_funcsMethod · 0.40
test_one_arg_funcsMethod · 0.40
test_two_arg_funcsMethod · 0.40
test_randintMethod · 0.40
test_three_arg_funcsMethod · 0.40