torch_isfinite: Isfinite

View source: R/gen-namespace.R

torch_isfiniteR Documentation

Isfinite

Description

Isfinite

Usage

torch_isfinite(self)

Arguments

self

(Tensor) A tensor to check

TEST

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

Examples

if (torch_is_installed()) {

torch_isfinite(torch_tensor(c(1, Inf, 2, -Inf, NaN)))
}

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