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

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

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

# triuInPlace

[common]\
fun [triuInPlace](triuInPlace.md)(self: [Tensor](../Tensor/index.md), diagonal: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 0): [Tensor](../Tensor/index.md)

`triuInPlace(self: Tensor, diagonal: Long = 0L)`: the `triu_` operator. In-place `triu`: zeroes the lower triangle through `self`; same arguments and error conditions as `triu()`. 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.