主页
Python
随机数据分布
demo_numpy_random_distribution2
运行 ❯
×
更改方向
保存代码
更改主题
from numpy import random x = random.choice([3, 5, 7, 9], p=[0.1, 0.3, 0.6, 0.0], size=(3, 5)) print(x)