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]])