Every line of 'numpy randint' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
171 def rand_int(low, high): 172 return np.random.randint(low, high)
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
38 def test_randomstate_randint_randomness(rnd): 39 a = rnd.randint(10000) 40 b = rnd.randint(10000) 41 assert a != b
208 def _uniform(val_range): 209 """ 210 Uniformly sample from the given range. 211 212 Args 213 val_range: A pair of lower and upper bound. 214 """ 215 return np.random.uniform(val_range[0], val_range[1])
16 def randint(a, b): 17 return a + int(random.random() * (b + 1 - a))