I have an array with 1M floats and want to get the top 10. Wondering if there's an argsort that will only give top 10 to speed things up. I suppose I could do np.argmax() 10 times, dropping the resulting index each time (probably by making it -inf, to not have to keep track of shifting indices). Just checking if there's a well-known inbuilt way.
Doesn't necessarily have to be numpy. Second best is another very common library.