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

Method test_gamma_floats

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

Source from the content-addressed store, hash-verified

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())
500 warmup(rg)
501 state = rg.bit_generator.state
502 r1 = rg.standard_gamma(4.0, 11, dtype=np.float32)
503 rg2 = Generator(self.bit_generator())
504 warmup(rg2)
505 rg2.bit_generator.state = state
506 r2 = rg2.standard_gamma(4.0, 11, dtype=np.float32)
507 assert_array_equal(r1, r2)
508 assert_equal(r1.dtype, np.float32)
509 assert_(comp_state(rg.bit_generator.state, rg2.bit_generator.state))
510
511 def test_normal_floats(self):
512 rg = Generator(self.bit_generator())

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected