Skip to main content

Module sort

Module sort 

Source
Expand description

Sort and argsort operations for FlexTensor.

Operates directly on storage without TensorData round-trips.

Modules§

dispatch

Functions§

argsort
Argsort along a dimension, returning indices that would sort the tensor.
argtopk
Return the indices of the k largest values along dim, in descending order. Equal values retain their original index order; NaNs precede finite values and infinities, and positive and negative zero compare equal.
sort
Sort elements along a dimension, returning the sorted tensor.
sort_with_indices
Sort elements along a dimension, returning (sorted_values, indices).