Answers for "how to find original index of sorted element list python"

1

index of sorted list python

vals = numpy.array([2,3,1,4,5])
sort_index = numpy.argsort(vals)

>>> sort_index
array([2, 0, 1, 3, 4])
Posted by: Guest on July-29-2021

Code answers related to "how to find original index of sorted element list python"

Python Answers by Framework

Browse Popular Code Answers by Language