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

Method test_normal_floats

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

Source from the content-addressed store, hash-verified

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())
513 warmup(rg)
514 state = rg.bit_generator.state
515 r1 = rg.standard_normal(11, dtype=np.float32)
516 rg2 = Generator(self.bit_generator())
517 warmup(rg2)
518 rg2.bit_generator.state = state
519 r2 = rg2.standard_normal(11, dtype=np.float32)
520 assert_array_equal(r1, r2)
521 assert_equal(r1.dtype, np.float32)
522 assert_(comp_state(rg.bit_generator.state, rg2.bit_generator.state))
523
524 def test_normal_zig_floats(self):
525 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