If you want to get the index of the sorted list for the original list, apply np.argsort() twice. In the example, 1 is the smallest value so it is indexed 0. 2 is the second-largest value to it is indexed 1.
np.argsort()
array-to-latex: Turn a Numpy Array into Latex
unyt: Manipulate and Convert Units in NumPy Arrays
NumPy.take: Take Elements From an Array
Your email address will not be published. Required fields are marked *
Name
Email
Website
Save my name, email, and website in this browser for the next time I comment.