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

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

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

# fillInPlace

[common]\
fun [fillInPlace](fillInPlace.md)(self: [Tensor](../Tensor/index.md), value: [Tensor](../Tensor/index.md), device: [Placement](../Placement/index.md)? = null): [Tensor](../Tensor/index.md)

`fillInPlace(self: Tensor, value: Tensor, device: Placement? = null)`: the `fill_` operator. In-place `fill`: overwrites every element of `self` with `value`; same arguments and error conditions as `fill()`. A view input writes through its base storage. 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 [fillInPlace](fillInPlace.md)(self: [Tensor](../Tensor/index.md), value: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html), device: [Placement](../Placement/index.md)? = null): [Tensor](../Tensor/index.md)

`fillInPlace(self: Tensor, value: Double, device: Placement? = null)`: the number form of `fill_`, `value` as a scalar.