Element-wise check if values are NaN. You can also use is.nan().
Usage
nv_is_nan(operand)
# S3 method for class 'AnvlArray'
is.nan(x)
Arguments
- operand
(arrayish)
Operand.
- x
(arrayish)
Same as operand; this is the name used by the base R S3 generic.
Value
arrayish
Has the same shape as the input and boolean data type.
Examples
x <- nv_array(c(1, NaN, Inf, -Inf, 0))
nv_is_nan(x)
#> AnvlArray
#> 0
#> 1
#> 0
#> 0
#> 0
#> [ CPUbool{5} ]