(self)
| 3404 | assert ret is out |
| 3405 | |
| 3406 | def test_trace_subclass(self): |
| 3407 | # The class would need to overwrite trace to ensure single-element |
| 3408 | # output also has the right subclass. |
| 3409 | class MyArray(np.ndarray): |
| 3410 | pass |
| 3411 | |
| 3412 | b = np.arange(8).reshape((2, 2, 2)).view(MyArray) |
| 3413 | t = b.trace() |
| 3414 | assert_(isinstance(t, MyArray)) |
| 3415 | |
| 3416 | def test_put(self): |
| 3417 | icodes = np.typecodes['AllInteger'] |