(self, ufunc, method, *inputs, **kw)
| 4026 | # regression test for gh-9112 |
| 4027 | class PowerOnly(np.ndarray): |
| 4028 | def __array_ufunc__(self, ufunc, method, *inputs, **kw): |
| 4029 | if ufunc is not np.power: |
| 4030 | raise NotImplementedError |
| 4031 | return "POWER!" |
| 4032 | # explicit cast to float, to ensure the fast power path is taken. |
| 4033 | a = np.array(5., dtype=np.float64).view(PowerOnly) |
| 4034 | assert_equal(a ** 2.5, "POWER!") |
nothing calls this directly
no outgoing calls
no test coverage detected