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

Method test_random_integers

numpy/random/tests/test_random.py:325–334  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

323 assert_array_equal(actual, desired)
324
325 def test_random_integers(self):
326 np.random.seed(self.seed)
327 with suppress_warnings() as sup:
328 w = sup.record(DeprecationWarning)
329 actual = np.random.random_integers(-99, 99, size=(3, 2))
330 assert_(len(w) == 1)
331 desired = np.array([[31, 3],
332 [-52, 41],
333 [-48, -66]])
334 assert_array_equal(actual, desired)
335
336 def test_random_integers_max_int(self):
337 # Tests whether random_integers can generate the

Callers

nothing calls this directly

Calls 4

suppress_warningsClass · 0.90
assert_Function · 0.90
assert_array_equalFunction · 0.90
recordMethod · 0.80

Tested by

no test coverage detected