《python筆記》mean()函數功能:求取均值

用法:mean(matrix,axis=0)  其中 matrix爲一個矩陣,axis爲參數code 以m * n矩陣舉例:class axis 不設置值,對 m*n 個數求均值,返回一個實數import axis = 0:壓縮行,對各列求均值,返回 1* n 矩陣numpy axis =1 :壓縮列,對各行求均值,返回 m *1 矩陣im 舉例:co >>>  import numpy as n
相關文章
相關標籤/搜索