Skip to contents

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

Usage

nv_ne(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_ne() for the underlying primitive.

Examples

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