torch_isnan: Isnan

View source: R/gen-namespace.R

torch_isnanR Documentation

Isnan

Description

Isnan

Usage

torch_isnan(self)

Arguments

self

(Tensor) A tensor to check

TEST

Returns a new tensor with boolean elements representing if each element is NaN or not.

Examples

if (torch_is_installed()) {

torch_isnan(torch_tensor(c(1, NaN, 2)))
}

torch documentation built on May 29, 2024, 9:54 a.m.