(self)
| 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 | |
| 51 | if __name__ == "__main__": |