Skip to contents

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

Usage

nv_is_finite(operand)

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

Arguments

operand

(arrayish)
Operand.

x

(arrayish)
Operand.

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