def testMultivariateNormal(self): mean = [0, 0] cov = [[1, 0], [0, 100]] t = multivariate_normal(mean, cov, 5000, chunk_size=500) self.assertEqual(t.shape, (5000, 2)) self.assertEqual(t.op.size, (5000, )) t = t.tiles() self.assertEqual(t.nsplits, ((500, ) * 10, (2, ))) self.assertEqual(len(t.chunks), 10) c = t.chunks[0] self.assertEqual(c.shape, (500, 2)) self.assertEqual(c.op.size, (500, ))
def test_multivariate_normal(): mean = [0, 0] cov = [[1, 0], [0, 100]] t = multivariate_normal(mean, cov, 5000, chunk_size=500) assert t.shape == (5000, 2) assert t.op.size == (5000, ) t = tile(t) assert t.nsplits == ((500, ) * 10, (2, )) assert len(t.chunks) == 10 c = t.chunks[0] assert c.shape == (500, 2) assert c.op.size == (500, )