攝影或3C

Python: numpy.mean(arry2d , axis=0) ; axis參數如何用? numpy.max() ; numpy.min() ; numpy.argmax() #沿軸max的index; numpy.argmin() #沿軸min的index

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

儲蓄保險王

儲蓄險是板主最喜愛的儲蓄工具,最喜愛的投資理財工具則是ETF,最喜愛的省錢工具則是信用卡