MCPcopy
hub / github.com/numpy/numpy / test_multivariate_normal

Method test_multivariate_normal

numpy/random/tests/test_smoke.py:461–471  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

459 assert_(vals.shape == (10,))
460
461 def test_multivariate_normal(self):
462 rg = self._create_rng().rg
463 mean = [0, 0]
464 cov = [[1, 0], [0, 100]] # diagonal covariance
465 x = rg.multivariate_normal(mean, cov, 5000)
466 assert_(x.shape == (5000, 2))
467 x_zig = rg.multivariate_normal(mean, cov, 5000)
468 assert_(x.shape == (5000, 2))
469 x_inv = rg.multivariate_normal(mean, cov, 5000)
470 assert_(x.shape == (5000, 2))
471 assert_((x_zig != x_inv).any())
472
473 def test_multinomial(self):
474 rg = self._create_rng().rg

Callers

nothing calls this directly

Calls 3

_create_rngMethod · 0.95
assert_Function · 0.90
anyMethod · 0.45

Tested by

no test coverage detected