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

Method test_identity

tests/transforms/test_randidentity.py:27–31  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

25
26class TestIdentity(NumpyImageTestCase2D):
27 def test_identity(self):
28 for p in TEST_NDARRAYS:
29 img = p(self.imt)
30 identity = mt.RandIdentity()
31 assert_allclose(img, identity(img))
32
33 def test_caching(self, init=1, expect=4, expect_pre_cache=2):
34 # check that we get the correct result (two lots of T so should get 4)

Callers

nothing calls this directly

Calls 2

assert_allcloseFunction · 0.90
identityFunction · 0.85

Tested by

no test coverage detected