effect : Generate an array of given shapes ( In fact, it should be ndarray Object or a single value ), The values in the array obey [0, 1) Between Uniform distribution .
Parameters :d0, d, ..., dn : int, Optional . If there is no parameter, it returns a float Random number of type , The random number obeys [0, 1) A uniform distribution between .
Return value :ndarray Object or a float The value of the type
# [0, 1) A random number evenly distributed between ,3 That's ok 2 Column
a = np.random.rand(3, 2)
print(a)
# No shapes provided
b = np.random.rand()
print(b)
[[0.26054323 0.28184468]
[0.7783674 0.71733674]
[0.90302256 0.49303252]]
0.6022098740124009