How to create a random number in Numpy

To create a random in [0.0, 1.0), we can use random.random_sample() function.

For example:

>>> import numpy as np
>>> np.random.random_sample()
0.31504918964721573

,