Learn R Programming

torch (version 0.0.2)

torch_isnan: Isnan

Description

Isnan

Arguments

input

(Tensor) A tensor to check

TEST

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

Examples

Run this code
# NOT RUN {
if (torch_is_installed()) {

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

Run the code above in your browser using DataLab