Just as a save, please skip it.
import numpy as np loc_max=np.max(segMat,axis=1) #按行,取每行的最大值
python column first
One sentence of code normalizes the four-digit matrix by column :
sig=np.array(sig/np.max(sig,axis=0)) # 归一化
Show: