(self)
| 135 | assert_allclose(rotated, p(expected), rtol=1.0e-5, atol=1.0e-8, type_test="tensor") |
| 136 | |
| 137 | def test_spatial_axes(self): |
| 138 | rotate = Rotate90(spatial_axes=(0, -1)) |
| 139 | for p in TEST_NDARRAYS_ALL: |
| 140 | im = p(self.imt[0]) |
| 141 | call_param = {"img": im} |
| 142 | rotated = rotate(**call_param) |
| 143 | |
| 144 | # test lazy |
| 145 | test_resampler_lazy(rotate, rotated, call_param=call_param) |
| 146 | rotate.lazy = False |
| 147 | |
| 148 | test_local_inversion(rotate, rotated, im) |
| 149 | expected = [np.rot90(channel, 1, (0, -1)) for channel in self.imt[0]] |
| 150 | expected = np.stack(expected) |
| 151 | assert_allclose(rotated, p(expected), rtol=1.0e-5, atol=1.0e-8, type_test="tensor") |
| 152 | |
| 153 | def test_prob_k_spatial_axes(self): |
| 154 | rotate = Rotate90(k=2, spatial_axes=(0, 1)) |
nothing calls this directly
no test coverage detected