no.random.uniform(low,high,size)
每个参数都什么意思可以在其他博客中找到,今天想详细介绍一下size
上代码:
import numpy as np
max = 10
min = 1
x, y = np.random.uniform(min, max, (2,))
print(x)
print(y)
import numpy as np
max = 10
min = 1
x, y = np.random.uniform(min, max, (2, 3))
print(x)
print(y)
import numpy as np
max = 10
min = 1
x, y, z = np.random.uniform(min, max, (3, 2))
print(x)
print(y)
print(z)