MCPcopy Create free account
hub / github.com/numpy/numpy / test_multivariate_normal

Method test_multivariate_normal

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

Source from the content-addressed store, hash-verified

411 assert_(vals.shape == (10,))
412
413 def test_multivariate_normal(self):
414 mean = [0, 0]
415 cov = [[1, 0], [0, 100]] # diagonal covariance
416 x = self.rg.multivariate_normal(mean, cov, 5000)
417 assert_(x.shape == (5000, 2))
418 x_zig = self.rg.multivariate_normal(mean, cov, 5000)
419 assert_(x.shape == (5000, 2))
420 x_inv = self.rg.multivariate_normal(mean, cov, 5000)
421 assert_(x.shape == (5000, 2))
422 assert_((x_zig != x_inv).any())
423
424 def test_multinomial(self):
425 vals = self.rg.multinomial(100, [1.0 / 3, 2.0 / 3])

Callers

nothing calls this directly

Calls 2

assert_Function · 0.90
anyMethod · 0.45

Tested by

no test coverage detected