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

Method test_uniform_double

numpy/random/tests/test_direct.py:247–258  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

245 gauss_from_uint(self.data2['data'], n, self.bits))
246
247 def test_uniform_double(self):
248 rs = Generator(self.bit_generator(*self.data1['seed']))
249 vals = uniform_from_uint(self.data1['data'], self.bits)
250 uniforms = rs.random(len(vals))
251 assert_allclose(uniforms, vals)
252 assert_equal(uniforms.dtype, np.float64)
253
254 rs = Generator(self.bit_generator(*self.data2['seed']))
255 vals = uniform_from_uint(self.data2['data'], self.bits)
256 uniforms = rs.random(len(vals))
257 assert_allclose(uniforms, vals)
258 assert_equal(uniforms.dtype, np.float64)
259
260 def test_uniform_float(self):
261 rs = Generator(self.bit_generator(*self.data1['seed']))

Callers

nothing calls this directly

Calls 4

assert_allcloseFunction · 0.90
assert_equalFunction · 0.90
uniform_from_uintFunction · 0.85
randomMethod · 0.80

Tested by

no test coverage detected