MCPcopy
hub / github.com/numpy/numpy / test_uniform_double

Method test_uniform_double

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

Source from the content-addressed store, hash-verified

283 gauss_from_uint(self.data2['data'], n, self.bits))
284
285 def test_uniform_double(self):
286 rs = Generator(self.bit_generator(*self.data1['seed']))
287 vals = uniform_from_uint(self.data1['data'], self.bits)
288 uniforms = rs.random(len(vals))
289 assert_allclose(uniforms, vals)
290 assert_equal(uniforms.dtype, np.float64)
291
292 rs = Generator(self.bit_generator(*self.data2['seed']))
293 vals = uniform_from_uint(self.data2['data'], self.bits)
294 uniforms = rs.random(len(vals))
295 assert_allclose(uniforms, vals)
296 assert_equal(uniforms.dtype, np.float64)
297
298 def test_uniform_float(self):
299 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