Skip to main content

Module sorting

Module sorting 

Source

Enums§

Side
Side parameter for searchsorted.
SortKind
Sorting algorithm selection.

Functions§

argpartition
Return indices that would partition the array. The k-th element of the result is the index of the k-th smallest element; elements before index kth are indices of smaller-or-equal elements, and elements after are indices of greater-or-equal.
argsort
Return the indices that would sort an array along the given axis.
lexsort
Indirect stable sort using a sequence of keys.
partition
Partial sort: rearrange elements so that a[kth] is the value that would be there in a sorted array, all elements before it are <=, and all elements after are >=. The relative order within the two halves is undefined.
searchsorted
Find indices where elements should be inserted to maintain order.
searchsorted_with_sorter
Find indices where elements should be inserted to maintain order, using sorter as a permutation that would sort a.
sort
Sort an array along the given axis (or flattened if axis is None).
sort_complex
Sort a 1-D complex array, comparing first by real part, then by imaginary.