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

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

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

# maskedFill

[common]\
fun [maskedFill](maskedFill.md)(input: [Tensor](../Tensor/index.md), mask: [Tensor](../Tensor/index.md), value: [Tensor](../Tensor/index.md)): [Tensor](../Tensor/index.md)

`maskedFill(input: Tensor, mask: Tensor, value: Tensor)`: the `masked_fill` operator. Replace the elements of `input` where `mask` is true with `value`. `mask` is Bool and broadcasts to `input`'s shape; `value` is a literal or a 0-D Tensor.

[common]\
fun [maskedFill](maskedFill.md)(input: [Tensor](../Tensor/index.md), mask: [Tensor](../Tensor/index.md), value: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)): [Tensor](../Tensor/index.md)

`maskedFill(input: Tensor, mask: Tensor, value: Double)`: the number form of `masked_fill`, `value` as a scalar.