Sorting, Searching, and Counting#

Sorting#

maxframe.tensor.sort

Return a sorted copy of a tensor.

maxframe.tensor.argsort

Returns the indices that would sort a tensor.

maxframe.tensor.partition

Return a partitioned copy of a tensor.

maxframe.tensor.argpartition

Perform an indirect partition along the given axis using the algorithm specified by the kind keyword.

Searching#

maxframe.tensor.argmax

Returns the indices of the maximum values along an axis.

maxframe.tensor.nanargmax

Return the indices of the maximum values in the specified axis ignoring NaNs.

maxframe.tensor.argmin

Returns the indices of the minimum values along an axis.

maxframe.tensor.nanargmin

Return the indices of the minimum values in the specified axis ignoring NaNs.

maxframe.tensor.nonzero

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

maxframe.tensor.flatnonzero

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

Counting#

maxframe.tensor.argwhere

Find the indices of tensor elements that are non-zero, grouped by element.

maxframe.tensor.count_nonzero

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