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

Method test_value_shape

tests/transforms/test_as_discrete.py:69–72  ·  view source on GitHub ↗
(self, input_param, img, out, expected_shape)

Source from the content-addressed store, hash-verified

67class TestAsDiscrete(unittest.TestCase):
68 @parameterized.expand(TEST_CASES)
69 def test_value_shape(self, input_param, img, out, expected_shape):
70 result = AsDiscrete(**input_param)(img)
71 assert_allclose(result, out, rtol=1e-3, type_test="tensor")
72 self.assertTupleEqual(result.shape, expected_shape)
73
74 def test_additional(self):
75 for p in TEST_NDARRAYS:

Callers

nothing calls this directly

Calls 2

AsDiscreteClass · 0.90
assert_allcloseFunction · 0.90

Tested by

no test coverage detected