Skip to main content

numpy.sorting

Standard library Module View source
function insertionsort
insertionsort[T: type](start: Ptr[T], n: int)
function ainsertionsort
ainsertionsort[T: type](v: Ptr[T], tosort: Ptr[int], n: int)
function heapsort
heapsort[T: type](start: Ptr[T], n: int)
function aheapsort
aheapsort[T: type](vv: Ptr[T], tosort: Ptr[int], n: int)
variable PYA_QS_STACK
PYA_QS_STACK: Literal[int] = 100
variable SMALL_QUICKSORT
SMALL_QUICKSORT: Literal[int] = 15
variable SMALL_MERGESORT
SMALL_MERGESORT: Literal[int] = 20
variable SMALL_STRING
SMALL_STRING: Literal[int] = 16
function mergesort
mergesort[T: type](start: Ptr[T], num: int)
function amergesort
amergesort[T: type](v: Ptr[T], tosort: Ptr[int], num: int)
variable INSERTION_SORT_THRESHOLD
INSERTION_SORT_THRESHOLD: Literal[int] = 24
variable NINTHER_THRESHOLD
NINTHER_THRESHOLD: Literal[int] = 128
variable PARTIAL_INSERTION_SORT_LIMIT
PARTIAL_INSERTION_SORT_LIMIT: Literal[int] = 8
function quicksort
quicksort[T: type](start: Ptr[T], n: int)
function aquicksort
aquicksort[T: type](start: Ptr[T], tosort: Ptr[int], n: int)
function key_of
key_of[T: type, UT: type](x: UT)
function nth_byte
nth_byte[T: type](key: T, l: int)
function radixsort
radixsort[T: type](start: Ptr[T], num: int)
function aradixsort
aradixsort[T: type](start: Ptr[T], tosort: Ptr[int], num: int)
variable TIMSORT_STACK_SIZE
TIMSORT_STACK_SIZE: Literal[int] = 128
class Buffer
class Buffer[T]
Fields 3
pw Ptr[T]
size int
T type
Constructors 1
__init__
__init__(self: Self)
Methods 2
resize
resize(self: Self, new_size: int)
free
free(self: Self)
function timsort
timsort[T: type](start: Ptr[T], num: int)
function atimsort
atimsort[T: type](start: Ptr[T], tosort: Ptr[int], num: int)
function stablesort
stablesort[T: type](start: Ptr[T], num: int)
function astablesort
astablesort[T: type](start: Ptr[T], tosort: Ptr[int], num: int)
variable MAX_PIVOT_STACK
MAX_PIVOT_STACK: Literal[int] = 50
class Sortee
@tuple
class Sortee[T]
Fields 2
v Ptr[T]
T type
Methods 1
swap
swap(self: Self, i: int, j: int)
Special methods 1
__call__
__call__(self: Self, i: int)
class ArgSortee
@tuple
class ArgSortee
Fields 1
tosort Ptr[int]
Methods 1
swap
swap(self: Self, i: int, j: int)
Special methods 1
__call__
__call__(self: Self, i: int)
class ArgIdx
@tuple
class ArgIdx
Fields 1
tosort Ptr[int]
Special methods 1
__call__
__call__(self: Self, i: int)
function partition
partition(a, kth, axis = -1, kind: str = "introselect")
function argpartition
argpartition(a: ndarray, kth, axis = -1, kind: str = "introselect")
function lexsort
lexsort(keys, axis: int = -1)
function sort
sort(a, axis = -1, kind: Optional[str] = None)
function argsort
argsort(a, axis = -1, kind: Optional[str] = None)
function sort_complex
sort_complex(a)
class ndarray
@extend
class ndarray[dtype, ndim]
Methods 4
sort
sort(self: Self, axis: int = -1, kind: Optional[str] = None)
argsort
argsort(self: Self, axis: int = -1, kind: Optional[str] = None)
partition
partition(self: Self, kth, axis: int = -1, kind: str = "introselect")
argpartition
argpartition(self: Self, kth, axis: int = -1, kind: str = "introselect")