Skip to contents

Element-wise inequality comparison.

Usage

nvl_ne(lhs, rhs)

Arguments

lhs, rhs

(tensorish)
Tensorish values of any data type. Must have the same shape.

Value

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

StableHLO

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

See also

Examples

jit_eval({
  x <- nv_tensor(c(1, 2, 3))
  y <- nv_tensor(c(1, 3, 2))
  nvl_ne(x, y)
})
#> AnvilTensor
#>  0
#>  1
#>  1
#> [ CPUi1{3} ]