(self)
| 3377 | assert_(type(ncu.exp(c) is C)) |
| 3378 | |
| 3379 | def test_failing_wrap(self): |
| 3380 | |
| 3381 | class A: |
| 3382 | def __array__(self, dtype=None, copy=None): |
| 3383 | return np.zeros(2) |
| 3384 | |
| 3385 | def __array_wrap__(self, arr, context, return_scalar): |
| 3386 | raise RuntimeError |
| 3387 | |
| 3388 | a = A() |
| 3389 | assert_raises(RuntimeError, ncu.maximum, a, a) |
| 3390 | assert_raises(RuntimeError, ncu.maximum.reduce, a) |
| 3391 | |
| 3392 | def test_failing_out_wrap(self): |
| 3393 |
nothing calls this directly
no test coverage detected