Skip to contents

Element-wise equality comparison. You can also use the == operator.

Usage

nv_eq(lhs, rhs)

Arguments

lhs, rhs

(arrayish)
Left and right operand. Operands are promoted to a common data type. Scalars are broadcast to the shape of the other operand.

Value

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

See also

prim_eq() for the underlying primitive.

Examples

x <- nv_array(c(1, 2, 3))
y <- nv_array(c(1, 3, 2))
x == y
#> AnvlArray
#>  1
#>  0
#>  0
#> [ CPUbool{3} ]