(self)
| 122 | assert_equal(rot90(a, axes=(1, 2)), rot90(a, axes=(-2, -1))) |
| 123 | |
| 124 | def test_rotation_axes(self): |
| 125 | a = np.arange(8).reshape((2, 2, 2)) |
| 126 | |
| 127 | a_rot90_01 = [[[2, 3], |
| 128 | [6, 7]], |
| 129 | [[0, 1], |
| 130 | [4, 5]]] |
| 131 | a_rot90_12 = [[[1, 3], |
| 132 | [0, 2]], |
| 133 | [[5, 7], |
| 134 | [4, 6]]] |
| 135 | a_rot90_20 = [[[4, 0], |
| 136 | [6, 2]], |
| 137 | [[5, 1], |
| 138 | [7, 3]]] |
| 139 | a_rot90_10 = [[[4, 5], |
| 140 | [0, 1]], |
| 141 | [[6, 7], |
| 142 | [2, 3]]] |
| 143 | |
| 144 | assert_equal(rot90(a, axes=(0, 1)), a_rot90_01) |
| 145 | assert_equal(rot90(a, axes=(1, 0)), a_rot90_10) |
| 146 | assert_equal(rot90(a, axes=(1, 2)), a_rot90_12) |
| 147 | |
| 148 | for k in range(1, 5): |
| 149 | assert_equal(rot90(a, k=k, axes=(2, 0)), |
| 150 | rot90(a_rot90_20, k=k - 1, axes=(2, 0))) |
| 151 | |
| 152 | @pytest.mark.parametrize('k', [2.0, 2.25]) |
| 153 | def test_noninteger_k_deprecation_warning(self, k): |
nothing calls this directly
no test coverage detected