import numpy as np
def nlargest_indices(arr, n):
uniques = np.unique(arr)
threshold = uniques[-n]
return np.where(arr >= threshold)
full = np.array([[1,2,7],[4,5,6]])
x, y = nlargest_indices(full, 2)
print(x)
print(y)
import numpy as np
def nlargest_indices(arr, n):
uniques = np.unique(arr)
threshold = uniques[-n]
return np.where(arr >= threshold)
full = np.array([[1,2,7],[4,5,6]])
x, y = nlargest_indices(full, 2)
print(x)
print(y)