MCPcopy
hub / github.com/numpy/numpy / test_random_integers

Method test_random_integers

numpy/random/tests/test_randomstate.py:495–507  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

493 assert_array_equal(actual, desired)
494
495 def test_random_integers(self):
496 rng = random.RandomState(self.seed)
497 with pytest.warns(DeprecationWarning):
498 actual = rng.random_integers(-99, 99, size=(3, 2))
499 desired = np.array([[31, 3],
500 [-52, 41],
501 [-48, -66]])
502 assert_array_equal(actual, desired)
503
504 rng = random.RandomState(self.seed)
505 with pytest.warns(DeprecationWarning):
506 actual = rng.random_integers(198, size=(3, 2))
507 assert_array_equal(actual, desired + 100)
508
509 def test_tomaxint(self):
510 rs = random.RandomState(self.seed)

Callers

nothing calls this directly

Calls 1

assert_array_equalFunction · 0.90

Tested by

no test coverage detected