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

Method test_shape

tests/transforms/test_map_label_value.py:79–85  ·  view source on GitHub ↗
(self, input_param, input_data, expected_value)

Source from the content-addressed store, hash-verified

77class TestMapLabelValue(unittest.TestCase):
78 @parameterized.expand(TESTS)
79 def test_shape(self, input_param, input_data, expected_value):
80 result = MapLabelValue(**input_param)(input_data)
81 if isinstance(expected_value, torch.Tensor):
82 assert_allclose(result, expected_value)
83 else:
84 np.testing.assert_equal(result, expected_value)
85 self.assertTupleEqual(result.shape, expected_value.shape)
86
87
88if __name__ == "__main__":

Callers

nothing calls this directly

Calls 2

MapLabelValueClass · 0.90
assert_allcloseFunction · 0.90

Tested by

no test coverage detected