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

Method test_additional

tests/transforms/test_as_discrete.py:74–77  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

72 self.assertTupleEqual(result.shape, expected_shape)
73
74 def test_additional(self):
75 for p in TEST_NDARRAYS:
76 out = AsDiscrete(argmax=True, dim=1, keepdim=False)(p([[[0.0, 1.0]], [[2.0, 3.0]]]))
77 assert_allclose(out, p([[0.0, 0.0], [0.0, 0.0]]), type_test=False)
78
79
80if __name__ == "__main__":

Callers

nothing calls this directly

Calls 2

AsDiscreteClass · 0.90
assert_allcloseFunction · 0.90

Tested by

no test coverage detected