(self)
| 3025 | assert_array_equal(x, np.array((1, 2, 3))) |
| 3026 | |
| 3027 | def test_priority_with_scalar(self): |
| 3028 | # test fix for bug #826: |
| 3029 | |
| 3030 | class A(np.ndarray): |
| 3031 | __array_priority__ = 10 |
| 3032 | |
| 3033 | def __new__(cls): |
| 3034 | return np.asarray(1.0, 'float64').view(cls).copy() |
| 3035 | |
| 3036 | a = A() |
| 3037 | x = np.float64(1)*a |
| 3038 | assert_(isinstance(x, A)) |
| 3039 | assert_array_equal(x, np.array(1)) |
| 3040 | |
| 3041 | def test_old_wrap(self): |
| 3042 |
nothing calls this directly
no test coverage detected