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

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

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

# select

[common]\
fun [select](select.md)(input: [Tensor](../Tensor/index.md), dim: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), index: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)): [Tensor](../Tensor/index.md)

`select(input: Tensor, dim: Long, index: Long)`: the `select` operator. One position along `dim` (the dim is removed). `index` is an int literal OR a 0-D integer Tensor (e.g. a `shape_host`-derived index) so a data-dependent select never reads the value to the host.