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

Method test_randn

numpy/random/tests/test_randomstate.py:459–469  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

457 assert_array_almost_equal(actual, desired, decimal=15)
458
459 def test_randn(self):
460 random.seed(self.seed)
461 actual = random.randn(3, 2)
462 desired = np.array([[1.34016345771863121, 1.73759122771936081],
463 [1.498988344300628, -0.2286433324536169],
464 [2.031033998682787, 2.17032494605655257]])
465 assert_array_almost_equal(actual, desired, decimal=15)
466
467 random.seed(self.seed)
468 actual = random.randn()
469 assert_array_almost_equal(actual, desired[0, 0], decimal=15)
470
471 def test_randint(self):
472 random.seed(self.seed)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected