So, it's an indirect sort that returns the indices that would sort an array. Why is it "argsort" (which makes some sense given that it takes an argument -- the type of sort to use) but not "indirect_sort" or something like that? Or get_sort_indexer?
Googling for argsort gives numpy as first result, so it might indeed be a bit uncommon name. This might be something historic, apparently it already existed in 1997 in Numeric, a predecessor to Numpy.
I would guess they came up with that name as a parallel to argmax, which seems to be standard mathematical function that is implemented in many languages (numpy, mathematica, ...), even though the analogy is not perfect.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With