(self)
| 4025 | assert ret is out |
| 4026 | |
| 4027 | def test_trace_subclass(self): |
| 4028 | # The class would need to overwrite trace to ensure single-element |
| 4029 | # output also has the right subclass. |
| 4030 | class MyArray(np.ndarray): |
| 4031 | pass |
| 4032 | |
| 4033 | b = np.arange(8).reshape((2, 2, 2)).view(MyArray) |
| 4034 | t = b.trace() |
| 4035 | assert_(isinstance(t, MyArray)) |
| 4036 | |
| 4037 | def test_put(self): |
| 4038 | icodes = np.typecodes['AllInteger'] |