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

Method test_in_bounds_fuzz

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

Source from the content-addressed store, hash-verified

323 "message:\n\n%s" % str(e))
324
325 def test_in_bounds_fuzz(self):
326 # Don't use fixed seed
327 random.seed()
328
329 for dt in self.itype[1:]:
330 for ubnd in [4, 8, 16]:
331 vals = self.rfunc(2, ubnd, size=2**16, dtype=dt)
332 assert_(vals.max() < ubnd)
333 assert_(vals.min() >= 2)
334
335 vals = self.rfunc(0, 2, size=2**16, dtype=np.bool_)
336
337 assert_(vals.max() < 2)
338 assert_(vals.min() >= 0)
339
340 def test_repeatability(self):
341 # We use a sha256 hash of generated sequences of 1000 samples

Callers

nothing calls this directly

Calls 3

assert_Function · 0.90
maxMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected