Every line of 'np random 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
33 def gen_random(): 34 return random.random()
87 def randomize( min, max ): 88 return random.randint( min, max )
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])
15 def rando(): 16 return random.StrongRandom().randint(2, 20000000)
309 def uniform(self, a, b): 310 """Get a random number in the range [a, b) or [a, b] depending on rounding.""" 311 return a + (b - a) * self.random()