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

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

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

# maskedScatter

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

`maskedScatter(input: Tensor, mask: Tensor, source: Tensor)`: the `masked_scatter` operator. A copy of `input` with the leading `count(mask)` elements of `src` (read row-major) written at the positions where `mask` is true. `mask` is Bool, broadcastable to `input`; `src` must supply at least `count(mask)` elements.