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

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

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

# fill

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

`fill(input: Tensor, value: Tensor, device: Placement? = null)`: the `fill` operator. A new tensor with `input`'s shape and dtype, every element set to `value`. `input` supplies GEOMETRY only; its data is never read. `value` is a literal or a 0-D Tensor (a tensor value traces symbolically).

[common]\
fun [fill](fill.md)(input: [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)

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