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

Method test_uniform

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

Source from the content-addressed store, hash-verified

1213 assert_array_almost_equal(actual, desired, decimal=14)
1214
1215 def test_uniform(self):
1216 rng = random.RandomState(self.seed)
1217 actual = rng.uniform(low=1.23, high=10.54, size=(3, 2))
1218 desired = np.array([[6.99097932346268003, 6.73801597444323974],
1219 [9.50364421400426274, 9.53130618907631089],
1220 [5.48995325769805476, 8.47493103280052118]])
1221 assert_array_almost_equal(actual, desired, decimal=15)
1222
1223 def test_uniform_range_bounds(self):
1224 fmin = np.finfo('float').min

Callers

nothing calls this directly

Calls 2

uniformMethod · 0.80

Tested by

no test coverage detected