Skip to content

Commit a7e60ea

Browse files
TEST: fix IndexError in tests/test_random.py (#937)
fix IndexError: too many indices for array in tests/test_random.py::TestDistributionsMultivariateNormal::test_moments Co-authored-by: Alexander-Makaryev <[email protected]>
1 parent d4fa31e commit a7e60ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_random.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ def test_moments(self):
518518
mean = [2.56, 3.23]
519519
cov = [[1, 0], [0, 1]]
520520
size = 10**5
521-
res = numpy.array(dpnp.random.multivariate_normal(mean=mean, cov=cov, size=size))
521+
res = dpnp.asnumpy(dpnp.random.multivariate_normal(mean=mean, cov=cov, size=size))
522522
res_mean = [numpy.mean(res.T[0]), numpy.mean(res.T[1])]
523523
assert_allclose(res_mean, mean, rtol=1e-02, atol=0)
524524

0 commit comments

Comments
 (0)