random_array
def random_array(shape, low=0.0, high=1.0):
"""
Generates a random array with the given shape and values in the range [low, high).
Parameters:
- shape (tuple): The shape of the array to generate.
- low (float): The lower bound of the random values.
- high (float): The upper bound of the random values.
Returns:
- np.array: A random array of the specified shape and value range.
"""
return np.random.uniform(low, high, size=shape)
Last updated