Sorting, searching, and counting#

Sorting#

argpartition(a, kth[, axis, kind, order])

Perform an indirect partition along the given axis.

argsort(a[, axis, kind, order])

Returns the indices that would sort an array.

msort(a)

Returns a sorted copy of an array sorted along the first axis.

partition(a, kth[, axis, kind, order])

Returns a partitioned copy of an array.

sort(a[, axis, kind, order])

Returns a sorted copy of an array.

sort_complex(a)

Returns a sorted copy of an array sorted along the last axis.

Searching#

argmax(a[, axis, out, keepdims])

Returns the indices of the maximum values along an axis.

argmin(a[, axis, out, keepdims])

Returns the indices of the minimum values along an axis.

nonzero(a)

Return the indices of the elements that are non-zero.

where(condition, [x, y])

Return elements chosen from x or y depending on condition.

Counting#

count_nonzero(a[, axis])

Counts the number of non-zero values in the array a.