% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gen-namespace-docs.R,
%   R/gen-namespace-examples.R, R/with-indices.R
\name{torch_argsort}
\alias{torch_argsort}
\title{Argsort}
\usage{
torch_argsort(self, dim = -1L, descending = FALSE)
}
\arguments{
\item{self}{(Tensor) the input tensor.}

\item{dim}{(int, optional) the dimension to sort along}

\item{descending}{(bool, optional) controls the sorting order (ascending or descending)}
}
\description{
Argsort
}
\section{argsort(input, dim=-1, descending=False) -> LongTensor }{


Returns the indices that sort a tensor along a given dimension in ascending
order by value.

This is the second value returned by \code{torch_sort}.  See its documentation
for the exact semantics of this method.
}

\examples{
if (torch_is_installed()) {

a = torch_randn(c(4, 4))
a
torch_argsort(a, dim=1)
}
}
