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

Method test_shape

tests/transforms/test_as_channel_last.py:31–34  ·  view source on GitHub ↗
(self, in_type, input_param, expected_shape)

Source from the content-addressed store, hash-verified

29class TestAsChannelLast(unittest.TestCase):
30 @parameterized.expand(TESTS)
31 def test_shape(self, in_type, input_param, expected_shape):
32 test_data = in_type(np.random.randint(0, 2, size=[1, 2, 3, 4]))
33 result = AsChannelLast(**input_param)(test_data)
34 self.assertTupleEqual(result.shape, expected_shape)
35
36
37if __name__ == "__main__":

Callers

nothing calls this directly

Calls 1

AsChannelLastClass · 0.90

Tested by

no test coverage detected