np.argsort in python sort in scending only code example Example: argsort in descending order numpy avgDists.argsort()[::-1][:n]