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

Method test_uniform_float

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

Source from the content-addressed store, hash-verified

536 assert_(not comp_state(state1, state2))
537
538 def test_uniform_float(self):
539 bit_generator = self._create_rng().bit_generator
540 rg = Generator(bit_generator(12345))
541 warmup(rg)
542 state = rg.bit_generator.state
543 r1 = rg.random(11, dtype=np.float32)
544 rg2 = Generator(bit_generator())
545 warmup(rg2)
546 rg2.bit_generator.state = state
547 r2 = rg2.random(11, dtype=np.float32)
548 assert_array_equal(r1, r2)
549 assert_equal(r1.dtype, np.float32)
550 assert_(comp_state(rg.bit_generator.state, rg2.bit_generator.state))
551
552 def test_gamma_floats(self):
553 bit_generator = self._create_rng().bit_generator

Callers

nothing calls this directly

Calls 7

_create_rngMethod · 0.95
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