Skip to contents

Element-wise check if values are finite (not Inf, -Inf, or NaN).

Usage

nv_is_finite(x)

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

Arguments

x

(arrayish)
Input array.

Value

arrayish
Has the same shape as the input and boolean data type.

See also

prim_is_finite() for the underlying primitive.

Examples

x <- nv_array(c(1, Inf, NaN, -Inf, 0))
nv_is_finite(x)
#> AnvlArray
#>  1
#>  0
#>  0
#>  0
#>  1
#> [ CPUbool{5} ]