python numpy寻找二维数组最大值index

import numpy as np


a = np.array([[1, 2, 3],
           [2, 3, 15],
           [3, 4, 5]])
print(a)
i = np.where(a==np.max(a[:, 2]))
print(i)
print(i[0])

 

你可能感兴趣的:(python numpy寻找二维数组最大值index)