Skip to contents

Element-wise check if values are infinite (Inf or -Inf). You can also use is.infinite().

Usage

nv_is_infinite(operand)

# S3 method for class 'AnvlBox'
is.infinite(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_infinite(x)
#> AnvlArray
#>  0
#>  0
#>  1
#>  1
#>  0
#> [ CPUbool{5} ]