MCPcopy Create free account
hub / github.com/Lauriat/funct / argsortBy

Method argsortBy

funct/Array.py:692–697  ·  view source on GitHub ↗

Returns the indices that would sort this Array according to provided sorting criteria.

(self, l, reverse=False)

Source from the content-addressed store, hash-verified

690 return self
691
692 def argsortBy(self, l, reverse=False):
693 """
694 Returns the indices that would sort this Array according to
695 provided sorting criteria.
696 """
697 return self.enumerate.sortBy(lambda e: l(e[1]), reverse=reverse)[:, 0]
698
699 def sort(self, inplace=False, **kwargs):
700 """ Sorts this Array. """

Callers 1

testMethod · 0.95

Calls 1

sortByMethod · 0.80

Tested by 1

testMethod · 0.76