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

Method test_uniform

numpy/random/tests/test_randomstate.py:1324–1337  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1322 seed = 123456789
1323
1324 def test_uniform(self):
1325 low = [0]
1326 high = [1]
1327 desired = np.array([0.53283302478975902,
1328 0.53413660089041659,
1329 0.50955303552646702])
1330
1331 rng = random.RandomState(self.seed)
1332 actual = rng.uniform(low * 3, high)
1333 assert_array_almost_equal(actual, desired, decimal=14)
1334
1335 rng = random.RandomState(self.seed)
1336 actual = rng.uniform(low, high * 3)
1337 assert_array_almost_equal(actual, desired, decimal=14)
1338
1339 def test_normal(self):
1340 loc = [0]

Callers

nothing calls this directly

Calls 2

uniformMethod · 0.80

Tested by

no test coverage detected