ne

Contents

ne#

class saiunit.lax.ne(x, y)#

Elementwise not-equals: \(x \neq y\).

Parameters:
  • x (saiunit.Quantity | Array | ndarray | bool | number | bool | int | float | complex) – First operand.

  • y (saiunit.Quantity | Array | ndarray | bool | number | bool | int | float | complex) – Second operand. Must have the same unit as x.

Returns:

result – Boolean array. Always unitless.

Return type:

bool | Array

Examples

>>> import saiunit as u
>>> import saiunit.lax as sulax
>>> import jax.numpy as jnp
>>> a = jnp.array([1.0, 2.0, 3.0]) * u.meter
>>> b = jnp.array([1.0, 5.0, 3.0]) * u.meter
>>> sulax.ne(a, b)
Array([False,  True, False], dtype=bool)