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

Method test_in_bounds_fuzz

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

Source from the content-addressed store, hash-verified

202 "message:\n\n%s" % str(e))
203
204 def test_in_bounds_fuzz(self):
205 # Don't use fixed seed
206 np.random.seed()
207
208 for dt in self.itype[1:]:
209 for ubnd in [4, 8, 16]:
210 vals = self.rfunc(2, ubnd, size=2**16, dtype=dt)
211 assert_(vals.max() < ubnd)
212 assert_(vals.min() >= 2)
213
214 vals = self.rfunc(0, 2, size=2**16, dtype=np.bool_)
215
216 assert_(vals.max() < 2)
217 assert_(vals.min() >= 0)
218
219 def test_repeatability(self):
220 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