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

Method test_random_float

numpy/random/tests/test_generator_mt19937.py:761–767  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

759 assert_array_almost_equal(actual, desired[0, 0], decimal=15)
760
761 def test_random_float(self):
762 random = Generator(MT19937(self.seed))
763 actual = random.random((3, 2))
764 desired = np.array([[0.0969992 , 0.70751746],
765 [0.08436483, 0.76773121],
766 [0.66506902, 0.71548719]])
767 assert_array_almost_equal(actual, desired, decimal=7)
768
769 def test_random_float_scalar(self):
770 random = Generator(MT19937(self.seed))

Callers

nothing calls this directly

Calls 2

randomMethod · 0.80

Tested by

no test coverage detected