(self)
| 3320 | assert_array_equal(x, np.array((1, 2, 3))) |
| 3321 | |
| 3322 | def test_priority_with_scalar(self): |
| 3323 | # test fix for bug #826: |
| 3324 | |
| 3325 | class A(np.ndarray): |
| 3326 | __array_priority__ = 10 |
| 3327 | |
| 3328 | def __new__(cls): |
| 3329 | return np.asarray(1.0, 'float64').view(cls).copy() |
| 3330 | |
| 3331 | a = A() |
| 3332 | x = np.float64(1) * a |
| 3333 | assert_(isinstance(x, A)) |
| 3334 | assert_array_equal(x, np.array(1)) |
| 3335 | |
| 3336 | def test_priority(self): |
| 3337 |
nothing calls this directly
no test coverage detected