import numpy as np. pa = [0.3, 0.2, 0.1, 0.1, 0.3]. pa=np.array(pa). a = np.random.choice(np.arange(5), size=5, replace=True, p=pa).
確定! 回上一頁