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

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

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

# indexSelect

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

`indexSelect(input: Tensor, dim: Long, index: Tensor)`: the `index_select` operator. Select whole rows of `input` at `index` positions along `dim`. Output = `input`'s shape with the `dim` extent replaced by `index`'s length; rows may repeat and appear in any order. `index` is 1-D `Int32`/`Int64`; prefer `Int32` where the extents allow (half the index bytes).