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

Method test_uniform

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

Source from the content-addressed store, hash-verified

1772 assert_array_almost_equal(actual, desired, decimal=14)
1773
1774 def test_uniform(self):
1775 random = Generator(MT19937(self.seed))
1776 actual = random.uniform(low=1.23, high=10.54, size=(3, 2))
1777 desired = np.array([[2.13306255040998 , 7.816987531021207], # noqa: E203
1778 [2.015436610109887, 8.377577533009589],
1779 [7.421792588856135, 7.891185744455209]])
1780 assert_array_almost_equal(actual, desired, decimal=15)
1781
1782 def test_uniform_range_bounds(self):
1783 fmin = np.finfo('float').min

Callers

nothing calls this directly

Calls 2

uniformMethod · 0.80

Tested by

no test coverage detected