MCPcopy Index your code
hub / github.com/numpy/numpy / test_random_float

Method test_random_float

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

Source from the content-addressed store, hash-verified

786 assert_array_almost_equal(actual, desired[0, 0], decimal=15)
787
788 def test_random_float(self):
789 random = Generator(MT19937(self.seed))
790 actual = random.random((3, 2))
791 desired = np.array([[0.0969992 , 0.70751746], # noqa: E203
792 [0.08436483, 0.76773121],
793 [0.66506902, 0.71548719]])
794 assert_array_almost_equal(actual, desired, decimal=7)
795
796 def test_random_float_scalar(self):
797 random = Generator(MT19937(self.seed))

Callers

nothing calls this directly

Calls 2

randomMethod · 0.80

Tested by

no test coverage detected