---
title: "ClikaRT::ops::index_fill_"
sidebar_label: "index_fill_"
description: "In-place index_fill: self[.., indices[i], ..] = value; same arguments and error conditions as index_fill()."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--function">function</span>

## index\_fill\_() {#index_fill_}

<div class="api-signature">

[`Tensor`](../Tensor.md)`&` **`index_fill_`**(<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md)`&` `self`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;`int64_t` `dim`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `indices`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`ScalarOrTensor`](../ScalarOrTensor.md) `value`<br />
)

</div>

In-place [`index_fill`](./index_fill.md#index_fill): `self[.., indices[i], ..] = value`; same arguments and error conditions as [`index_fill()`](./index_fill.md#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`](../Result.md)`<void>` under the [`Result`](../Result.md) surface; [`CLIKART_CHECK`](../../index.md#CLIKART_CHECK) is the mode-stable spelling.

<div class="api-declared">

Declared in `ClikaRT/compute/ops.h`, line 2557

</div>
