(self)
| 85 | assert_equal(rot90(a, axes=(1,2)), rot90(a, axes=(-2,-1))) |
| 86 | |
| 87 | def test_rotation_axes(self): |
| 88 | a = np.arange(8).reshape((2,2,2)) |
| 89 | |
| 90 | a_rot90_01 = [[[2, 3], |
| 91 | [6, 7]], |
| 92 | [[0, 1], |
| 93 | [4, 5]]] |
| 94 | a_rot90_12 = [[[1, 3], |
| 95 | [0, 2]], |
| 96 | [[5, 7], |
| 97 | [4, 6]]] |
| 98 | a_rot90_20 = [[[4, 0], |
| 99 | [6, 2]], |
| 100 | [[5, 1], |
| 101 | [7, 3]]] |
| 102 | a_rot90_10 = [[[4, 5], |
| 103 | [0, 1]], |
| 104 | [[6, 7], |
| 105 | [2, 3]]] |
| 106 | |
| 107 | assert_equal(rot90(a, axes=(0, 1)), a_rot90_01) |
| 108 | assert_equal(rot90(a, axes=(1, 0)), a_rot90_10) |
| 109 | assert_equal(rot90(a, axes=(1, 2)), a_rot90_12) |
| 110 | |
| 111 | for k in range(1,5): |
| 112 | assert_equal(rot90(a, k=k, axes=(2, 0)), |
| 113 | rot90(a_rot90_20, k=k-1, axes=(2, 0))) |
| 114 | |
| 115 | |
| 116 | class TestFlip: |
nothing calls this directly
no test coverage detected