Sorting, searching and counting

Sorting, searching and counting#

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

param a:

Tensor to be sorted

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

Returns the indices that would sort an array.

argmax(x[, axis, keepdims])

Returns indices of maximum elements obtained by iterating over given axis.

argmin(x[, axis, keepdims])

Returns indices of minimum elements obtained by iterating over given axis.

nonzero(a[, return_matrix])

Returns one of the following:

flatnonzero(a)

Return a vector of indices that are non-zero in the flattened version of a.

searchsorted(x, v[, side, sorter])

Find indices where elements should be inserted to maintain order.

where

if cond then ift else iff Generalizes a scalar Op to tensors.