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

Method test_uniform

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

Source from the content-addressed store, hash-verified

1869 self.seed = 123456789
1870
1871 def test_uniform(self):
1872 random = Generator(MT19937(self.seed))
1873 low = [0]
1874 high = [1]
1875 uniform = random.uniform
1876 desired = np.array([0.16693771389729, 0.19635129550675, 0.75563050964095])
1877
1878 random = Generator(MT19937(self.seed))
1879 actual = random.uniform(low * 3, high)
1880 assert_array_almost_equal(actual, desired, decimal=14)
1881
1882 random = Generator(MT19937(self.seed))
1883 actual = random.uniform(low, high * 3)
1884 assert_array_almost_equal(actual, desired, decimal=14)
1885
1886 def test_normal(self):
1887 loc = [0]

Callers

nothing calls this directly

Calls 2

uniformMethod · 0.80

Tested by

no test coverage detected