先給出結論: >>> a = np.array([[1, 2], [3, 4]]) >>> np.mean(a) # 將上面二維矩陣的每個元素相加除以元素個數(求平均數) 2.5 >>> np.mean(a, axis=0) # axis=0, ...
確定! 回上一頁