---
title: "ClikaRT::ops::nan_to_num_"
sidebar_label: "nan_to_num_"
description: "In-place nan_to_num: writes the result through self; same formula, arguments, and error conditions as nan_to_num(). 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>

## nan\_to\_num\_() {#nan_to_num_}

<div class="api-signature">

[`Tensor`](../Tensor.md)`&` **`nan_to_num_`**(<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md)`&` `self`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;`std::optional<double>` `nan` `=` `std::nullopt`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;`std::optional<double>` `posinf` `=` `std::nullopt`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;`std::optional<double>` `neginf` `=` `std::nullopt`<br />
)

</div>

In-place [`nan_to_num`](./nan_to_num.md#nan_to_num): writes the result through `self`; same formula, arguments, and error conditions as [`nan_to_num()`](./nan_to_num.md#nan_to_num). 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 5211

</div>
