关于 numpy max中axis的问题总结:
a = np.random.randint(1, 10,(2,3,4))
np.max(a, axis=0) #表示两个矩阵之间对应元素相比取最大值
np.max(a,axis =1) #表示单个(共2个)矩阵内三个行矩阵之间对应元素相比取最大值,然后再合并
np.max(a,axis=2) #表示三个行矩阵内部取最大值
np.sort(a) #默认axis=-1
关于 numpy max中axis的问题总结:
a = np.random.randint(1, 10,(2,3,4))
np.max(a, axis=0) #表示两个矩阵之间对应元素相比取最大值
np.max(a,axis =1) #表示单个(共2个)矩阵内三个行矩阵之间对应元素相比取最大值,然后再合并
np.max(a,axis=2) #表示三个行矩阵内部取最大值
np.sort(a) #默认axis=-1