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

Method test_uniform

numpy/random/tests/test_random.py:1067–1080  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1065 # Can steal the test written in PR #6938
1066
1067 def test_uniform(self):
1068 low = [0]
1069 high = [1]
1070 desired = np.array([0.53283302478975902,
1071 0.53413660089041659,
1072 0.50955303552646702])
1073
1074 rng = random.RandomState(self.seed)
1075 actual = rng.uniform(low * 3, high)
1076 assert_array_almost_equal(actual, desired, decimal=14)
1077
1078 rng = random.RandomState(self.seed)
1079 actual = rng.uniform(low, high * 3)
1080 assert_array_almost_equal(actual, desired, decimal=14)
1081
1082 def test_normal(self):
1083 loc = [0]

Callers

nothing calls this directly

Calls 2

uniformMethod · 0.80

Tested by

no test coverage detected