Skip to contents

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

Usage

nv_is_infinite(x)

# S3 method for class 'AnvlArray'
is.infinite(x)

Arguments

x

(arrayish)
Input array.

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