Drawing floating numbers with [0, 1] from uniform distribution by using numpy
numpy, python, uniform
Solution
It doesn't matter if you're drawing the uniformly distributed numbers from (0,1) or [0,1] or [0,1) or (0,1]. Because the probability of getting 0 or 1 is zero.
Problem
I'm currently trying to draw floating numbers from a uniform distribution. The Numpy provides numpy.random.uniform. ``` import numpy as np sample = np.random.uniform (0, 1, size = (N,) + (2,) + (2,) * K) ``` However, this module generates values over the half-open interval [0, 1). How can I draw floating numbers with [0, 1] from a uniform distribution? Thanks.