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

Method test_uniform_float

numpy/random/tests/test_smoke.py:485–496  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

483 assert_(not comp_state(state1, state2))
484
485 def test_uniform_float(self):
486 rg = Generator(self.bit_generator(12345))
487 warmup(rg)
488 state = rg.bit_generator.state
489 r1 = rg.random(11, dtype=np.float32)
490 rg2 = Generator(self.bit_generator())
491 warmup(rg2)
492 rg2.bit_generator.state = state
493 r2 = rg2.random(11, dtype=np.float32)
494 assert_array_equal(r1, r2)
495 assert_equal(r1.dtype, np.float32)
496 assert_(comp_state(rg.bit_generator.state, rg2.bit_generator.state))
497
498 def test_gamma_floats(self):
499 rg = Generator(self.bit_generator())

Callers

nothing calls this directly

Calls 6

assert_array_equalFunction · 0.90
assert_equalFunction · 0.90
assert_Function · 0.90
warmupFunction · 0.85
comp_stateFunction · 0.85
randomMethod · 0.80

Tested by

no test coverage detected