---
title: "sort"
sidebar_label: "sort"
description: "Kotlin binding reference: sort."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Ops](index.md)/[sort](sort.md)

# sort

[common]\
fun [sort](sort.md)(input: [Tensor](../Tensor/index.md), dim: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = -1L, descending: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = false, stable: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = false): [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[Tensor](../Tensor/index.md)&gt;

`sort(input: Tensor, dim: Long = -1L, descending: Boolean = false, stable: Boolean = false)`: the `sort` operator.