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

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

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

# indexFillInPlace

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

`indexFillInPlace(self: Tensor, dim: Long, indices: Tensor, value: Tensor)`: the `index_fill_` operator. In-place `index_fill`: `self[.., indices[i], ..] = value`; same arguments and error conditions as `index_fill()`. Fills through `self`'s storage (a strided view reaches its base buffer; aliases observe the write). Returns `self` under the value surface, `Result<void>` under the `Result` surface; `CLIKART_CHECK` is the mode-stable spelling. Writes through `self` and returns it, so calls chain.

[common]\
fun [indexFillInPlace](indexFillInPlace.md)(self: [Tensor](../Tensor/index.md), dim: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), indices: [Tensor](../Tensor/index.md), value: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)): [Tensor](../Tensor/index.md)

`indexFillInPlace(self: Tensor, dim: Long, indices: Tensor, value: Double)`: the number form of `index_fill_`, `value` as a scalar.