np.random.uniform()

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)

np.random.uniform()_第1张图片

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)

np.random.uniform()_第2张图片

你可能感兴趣的:(python)