---
title: "ClikaRT::ops::masked_fill_"
sidebar_label: "masked_fill_"
description: "In-place masked_fill: writes value through self where mask is true; same arguments and error conditions as masked_fill(). A view input writes through its base storage."
---

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

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

## masked\_fill\_() {#masked_fill_}

<div class="api-signature">

[`Tensor`](../Tensor.md)`&` **`masked_fill_`**(<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md)`&` `self`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `mask`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`ScalarOrTensor`](../ScalarOrTensor.md) `value`<br />
)

</div>

In-place [`masked_fill`](./masked_fill.md#masked_fill): writes `value` through `self` where `mask` is true; same arguments and error conditions as [`masked_fill()`](./masked_fill.md#masked_fill). A view input writes through its base storage. 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 2586

</div>
