Python使用numpy計算的範例代碼: import numpy as np z = np.array([1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0]) print(np.exp(z)/sum(np.exp(z))).
確定! 回上一頁