(self)
| 108 | zoom_fn(p(self.imt[0])) |
| 109 | |
| 110 | def test_padding_mode(self): |
| 111 | for p in TEST_NDARRAYS_ALL: |
| 112 | zoom_fn = Zoom(zoom=0.5, mode="nearest", padding_mode="constant", keep_size=True) |
| 113 | test_data = p([[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]]) |
| 114 | zoomed = zoom_fn(test_data) |
| 115 | expected = p([[[0.0, 0.0, 0.0, 0.0], [0.0, 1.0, 1.0, 0.0], [0.0, 1.0, 1.0, 0.0], [0.0, 0.0, 0.0, 0.0]]]) |
| 116 | assert_allclose(zoomed, expected, type_test=False) |
| 117 | |
| 118 | |
| 119 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected