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

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

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

# nanToNum

[common]\
fun [nanToNum](nanToNum.md)(input: [Tensor](../Tensor/index.md), nan: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)? = null, posinf: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)? = null, neginf: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)? = null): [Tensor](../Tensor/index.md)

`nanToNum(input: Tensor, nan: Double? = null, posinf: Double? = null, neginf: Double? = null)`: the `nan_to_num` operator. Replaces NaN and infinities with finite values. Each absent replacement falls back to the dtype-specific default: `0` for NaN, the dtype's largest finite value for `+inf`, its lowest for `-inf`.