https://blog.csdn.net/qq575379110/article/details/70538051/
test = np.array([[1, 2, 3], [2, 3, 4], [5, 4, 3], [8, 7, 2]])

np.argmax(test, 0)

你就这么想,0是最大的范围,所有的数组都要进行比较,只是比较的是这些数组相同位置上的数:

np.argmax(test, 1)

等于1的时候,比较范围缩小了,只会比较每个数组内的数的大小,结果也会根据有几个数组,产生几个结果。

test = np.array([[[1, 2, 3], [2, 3, 5],[2, 2, 2]], [[5, 4, 3], [8, 7, 2],[1, 2, 3]], [[5, 4, 6], [10, 7, 30], [1, 2, 3]]])

np.argmax(test, 0)


np.argmax(test, 1)

np.argmax(test, 2)


原文:https://www.cnblogs.com/ssyfj/p/13966299.html