(self)
| 3008 | do_test(lambda a: np.add(0, 0, a, where=False), lambda a: (0, 0, a)) |
| 3009 | |
| 3010 | def test_wrap_with_iterable(self): |
| 3011 | # test fix for bug #1026: |
| 3012 | |
| 3013 | class with_wrap(np.ndarray): |
| 3014 | __array_priority__ = 10 |
| 3015 | |
| 3016 | def __new__(cls): |
| 3017 | return np.asarray(1).view(cls).copy() |
| 3018 | |
| 3019 | def __array_wrap__(self, arr, context): |
| 3020 | return arr.view(type(self)) |
| 3021 | |
| 3022 | a = with_wrap() |
| 3023 | x = ncu.multiply(a, (1, 2, 3)) |
| 3024 | assert_(isinstance(x, with_wrap)) |
| 3025 | assert_array_equal(x, np.array((1, 2, 3))) |
| 3026 | |
| 3027 | def test_priority_with_scalar(self): |
| 3028 | # test fix for bug #826: |
nothing calls this directly
no test coverage detected