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

Method test_uniform

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

setSeedMethod · 0.95

Tested by

no test coverage detected