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

Method test_singleton

tests/transforms/utility/test_splitdim.py:43–48  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

41 self.assertEqual(arr.flatten()[0], out[0].flatten()[0])
42
43 def test_singleton(self):
44 shape = (2, 1, 8, 7)
45 for p in TEST_NDARRAYS:
46 arr = p(np.random.rand(*shape))
47 out = SplitDim(dim=1)(arr)
48 self.assertEqual(out[0].shape, shape)
49
50
51if __name__ == "__main__":

Callers

nothing calls this directly

Calls 1

SplitDimClass · 0.90

Tested by

no test coverage detected