np.random.seed(123)
full = np.random.randint(1, 99, size=(8, 8))
num_largest = 8
indices = (-full).argpartition(num_largest, axis=None)[:num_largest]
x, y = np.unravel_index(indices, full.shape)
print('full:')
print(full)
print('x =', x)
print('y =', y)
print('Largest values:', full[x, y])
print('Compare to:    ', np.sort(full, axis=None)[-num_largest:])
Find multiple maximum values in a 2d array fast