import numpy as np
# Creates a numpy array of shape (4,5), filled with random integers between 0 (inclusive) and 10 (exclusive)
rand_array = np.random.randint(0,10,(4,5))
import numpy as np
n = 2
m = 3
print(np.random.randn(n, m))
# prints random matrix with n rows and m columns
# example:
# array([[ 1.01267696, -1.85632995, 0.23078345],
# [ 0.34365521, -1.27063438, 2.90131288]])
from numpy import random
randArray = random.random(size=(2,4))
#输出
#array([[0.93848018,0.42005976,0.81470729,0.98797783],[0.12242703,0.42756378,0.59705163,0.36619101]])
rng.integers(5, size=(2, 4))