Every line of 'np random uniform' 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.
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])
98 def _uniform(self, np_array): 99 np_array[:] = np.random.uniform(self.low, self.high, len(np_array))
32 def get_uniform(self): 33 return np.random.uniform(self.value[0], self.value[1])
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()