MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / test_transpose

Method test_transpose

tests/transforms/test_transpose.py:31–37  ·  view source on GitHub ↗
(self, im, indices)

Source from the content-addressed store, hash-verified

29class TestTranspose(unittest.TestCase):
30 @parameterized.expand(TESTS)
31 def test_transpose(self, im, indices):
32 tr = Transpose(indices)
33 out1 = tr(im)
34 if isinstance(im, torch.Tensor):
35 im = im.cpu().numpy()
36 out2 = np.transpose(im, indices)
37 assert_allclose(out1, out2, type_test=False)
38
39
40if __name__ == "__main__":

Callers

nothing calls this directly

Calls 2

TransposeClass · 0.90
assert_allcloseFunction · 0.90

Tested by

no test coverage detected