random_floats
- ketos.utils.random_floats(size=1, low=0, high=1, seed=1)[source]
Returns a random number or numpy array of randum numbers uniformly distributed in the half-open interval [low, high)
- Args:
- size: int
Number of random numbers to be generated
- low: float
Lower value
- high: float
Upper value (not included)
- seed: int
Seed for the random number generator
- Returns:
- res: float or numpy array
Generated random number(s)
- Example:
>>> from ketos.utils import random_floats >>> >>> x = random_floats(3, 0.4, 7.2) >>> print(x) [3.23574963 5.29820656 0.40077775]