Skip to contents

Element-wise equality comparison.

Usage

prim_eq(lhs, rhs)

Arguments

lhs, rhs

(arrayish)
Arrayish values of any data type. Must have the same shape.

Value

arrayish
Has the same shape as the inputs and boolean data type. It is ambiguous if both inputs are ambiguous.

Implemented Rules

  • stablehlo

  • quickr

  • reverse

StableHLO

Lowers to stablehlo::hlo_compare() with comparison_direction = "EQ".

See also

Examples

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