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

Method test_in_bounds_fuzz

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

Source from the content-addressed store, hash-verified

213 f"but one was with the following message:\n\n{e}")
214
215 def test_in_bounds_fuzz(self):
216 # Don't use fixed seed
217 rng = random.RandomState()
218
219 for dt in self.itype[1:]:
220 for ubnd in [4, 8, 16]:
221 vals = rng.randint(2, ubnd, size=2**16, dtype=dt)
222 assert_(vals.max() < ubnd)
223 assert_(vals.min() >= 2)
224
225 vals = rng.randint(0, 2, size=2**16, dtype=np.bool)
226
227 assert_(vals.max() < 2)
228 assert_(vals.min() >= 0)
229
230 def test_repeatability(self):
231 import hashlib

Callers

nothing calls this directly

Calls 3

assert_Function · 0.90
maxMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected