代码示例:(标识:python_numpy_random_array_3)
python_numpy_random_array_3.py
from numpy import random

x = random.choice([3, 5, 7, 9], size=(3, 5))

print(x)
运行结果: