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

Method test_output_filling_uniform

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

Source from the content-addressed store, hash-verified

557 assert_equal(direct, existing)
558
559 def test_output_filling_uniform(self):
560 rg = self.rg
561 state = rg.bit_generator.state
562 size = (31, 7, 97)
563 existing = np.empty(size)
564 rg.bit_generator.state = state
565 rg.random(out=existing)
566 rg.bit_generator.state = state
567 direct = rg.random(size=size)
568 assert_equal(direct, existing)
569
570 existing = np.empty(size, dtype=np.float32)
571 rg.bit_generator.state = state
572 rg.random(out=existing, dtype=np.float32)
573 rg.bit_generator.state = state
574 direct = rg.random(size=size, dtype=np.float32)
575 assert_equal(direct, existing)
576
577 def test_output_filling_exponential(self):
578 rg = self.rg

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
randomMethod · 0.80

Tested by

no test coverage detected