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

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

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

# tril

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

`tril(input: Tensor, diagonal: Long = 0L)`: the `tril` operator. Zero out the entries ABOVE the chosen diagonal of the last two axes; the lower-triangular part survives. `diagonal`: 0 = main, +k above, -k below. Copies.