I'm currently trying to deduce floating numbers from a uniform distribution.
Numpy provides the numpy.random.uniform function.
import numpy as np
sample = np.random.uniform (0, 1, size = (N,) + (2,) + (2,) * K)
However, this module generates values in the half-open interval [0, 1).
How to draw floating numbers with [0, 1] from a uniform distribution?
Thank.
source
share