MCPcopy
hub / github.com/numpy/numpy / test_rand

Method test_rand

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

Source from the content-addressed store, hash-verified

459 seed = 1234567890
460
461 def test_rand(self):
462 rng = random.RandomState(self.seed)
463 actual = rng.rand(3, 2)
464 desired = np.array([[0.61879477158567997, 0.59162362775974664],
465 [0.88868358904449662, 0.89165480011560816],
466 [0.4575674820298663, 0.7781880808593471]])
467 assert_array_almost_equal(actual, desired, decimal=15)
468
469 def test_rand_singleton(self):
470 rng = random.RandomState(self.seed)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected