import numpy as np
a = np.array([[1, 2, 3], [4, 5, 6]])
mean_along_rows = np.mean(a, axis=0)
print(mean_along_rows)
mean_along_columns = np.mean(a, axis=1)
print(mean_along_columns)

numpy.max() ;
numpy.min()
numpy.argmax() #沿軸max的index
numpy.argmin() #沿軸min的index
axis參數同numpy.mean()
推薦hahow線上學習python: https://igrape.net/30afN
import numpy as np
a = np.array([[1, 2, 3], [4, 5, 6]])
max_along_rows = np.max(a, axis=0)
print(“max_along_rows:”, max_along_rows)
max_along_columns = np.max(a, axis=1)
print(“max_along_columns:”, max_along_columns)
argmax_along_rows = np.argmax(a, axis=0)
print(“argmax_along_rows:”, argmax_along_rows)
argmax_along_columns = np.argmax(a, axis=1)
print(“argmax_along_columns:”, argmax_along_columns)

推薦hahow線上學習python: https://igrape.net/30afN

![Python: 如何求整個 pandas.DataFrame 中的最大值? pandas.DataFrame .max().max() ; 如何求最大值的index, columns? numpy.where(condition, [x, y, ]/) ; condition為一 bool_mask Python: 如何求整個 pandas.DataFrame 中的最大值? pandas.DataFrame .max().max() ; 如何求最大值的index, columns? numpy.where(condition, [x, y, ]/) ; condition為一 bool_mask](https://i2.wp.com/savingking.com.tw/wp-content/uploads/2023/04/20230418154049_50.png?quality=90&zoom=2&ssl=1&resize=350%2C233)




![Python-docx 圖片提取完全指南:從 rId 到二進位資料的探險rid ; part = doc.part.rels[rid].target_part #return part.blob if “ImagePart” in type(part).__name__ else None Python-docx 圖片提取完全指南:從 rId 到二進位資料的探險rid ; part = doc.part.rels[rid].target_part #return part.blob if “ImagePart” in type(part).__name__ else None](https://i0.wp.com/savingking.com.tw/wp-content/uploads/2026/01/20260113135812_0_8fa645.png?quality=90&zoom=2&ssl=1&resize=350%2C233)



近期留言