Skip to contents

Element-wise check if values are NaN. You can also use is.nan().

Usage

nv_is_nan(operand)

# S3 method for class 'AnvlBox'
is.nan(x)

Arguments

operand

(arrayish)
Operand.

x

(arrayish)
Operand.

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} ]