(self, other)
| 16 | def _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 |