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

Method test_rand

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

Source from the content-addressed store, hash-verified

443 self.seed = 1234567890
444
445 def test_rand(self):
446 random.seed(self.seed)
447 actual = random.rand(3, 2)
448 desired = np.array([[0.61879477158567997, 0.59162362775974664],
449 [0.88868358904449662, 0.89165480011560816],
450 [0.4575674820298663, 0.7781880808593471]])
451 assert_array_almost_equal(actual, desired, decimal=15)
452
453 def test_rand_singleton(self):
454 random.seed(self.seed)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected