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

Method test_uniform

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

Source from the content-addressed store, hash-verified

1732 assert_array_almost_equal(actual, desired, decimal=14)
1733
1734 def test_uniform(self):
1735 random = Generator(MT19937(self.seed))
1736 actual = random.uniform(low=1.23, high=10.54, size=(3, 2))
1737 desired = np.array([[2.13306255040998 , 7.816987531021207],
1738 [2.015436610109887, 8.377577533009589],
1739 [7.421792588856135, 7.891185744455209]])
1740 assert_array_almost_equal(actual, desired, decimal=15)
1741
1742 def test_uniform_range_bounds(self):
1743 fmin = np.finfo('float').min

Callers

nothing calls this directly

Calls 2

uniformMethod · 0.80

Tested by

no test coverage detected