(self)
| 69 | assert_allclose(rotated, p(expected), rtol=1.0e-5, atol=1.0e-8, type_test="tensor") |
| 70 | |
| 71 | def test_spatial_axes(self): |
| 72 | rotate = Rotate90(spatial_axes=(0, -1)) |
| 73 | for p in TEST_NDARRAYS_ALL: |
| 74 | im = p(self.imt[0]) |
| 75 | call_param = {"img": im} |
| 76 | rotated = rotate(**call_param) |
| 77 | |
| 78 | # test lazy |
| 79 | test_resampler_lazy(rotate, rotated, call_param=call_param) |
| 80 | rotate.lazy = False |
| 81 | |
| 82 | test_local_inversion(rotate, rotated, im) |
| 83 | expected = [np.rot90(channel, 1, (0, -1)) for channel in self.imt[0]] |
| 84 | expected = np.stack(expected) |
| 85 | assert_allclose(rotated, p(expected), rtol=1.0e-5, atol=1.0e-8, type_test="tensor") |
| 86 | |
| 87 | def test_prob_k_spatial_axes(self): |
| 88 | rotate = Rotate90(k=2, spatial_axes=(0, 1)) |
nothing calls this directly
no test coverage detected