python二维数组求每一行的最大值及最大的索引

y是一个二维的数组
idx = np.argmax(y, axis=1)
pro = np.amax(y, axis=1)

猜你喜欢

转载自blog.csdn.net/iamjingong/article/details/86636934