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

Method test_output_filling_uniform

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

Source from the content-addressed store, hash-verified

614 assert_equal(direct, existing)
615
616 def test_output_filling_uniform(self):
617 rg = self._create_rng().rg
618 state = rg.bit_generator.state
619 size = (31, 7, 97)
620 existing = np.empty(size)
621 rg.bit_generator.state = state
622 rg.random(out=existing)
623 rg.bit_generator.state = state
624 direct = rg.random(size=size)
625 assert_equal(direct, existing)
626
627 existing = np.empty(size, dtype=np.float32)
628 rg.bit_generator.state = state
629 rg.random(out=existing, dtype=np.float32)
630 rg.bit_generator.state = state
631 direct = rg.random(size=size, dtype=np.float32)
632 assert_equal(direct, existing)
633
634 def test_output_filling_exponential(self):
635 rg = self._create_rng().rg

Callers

nothing calls this directly

Calls 3

_create_rngMethod · 0.95
assert_equalFunction · 0.90
randomMethod · 0.80

Tested by

no test coverage detected