logical_xor#
- class brainunit.math.logical_xor(x, y, *args, **kwargs)#
Compute the truth value of
x XOR yelement-wise.When both inputs are Quantities,
yis converted to the unit ofxbefore the operation.- Parameters:
- Returns:
out – Boolean XOR result.
- Return type:
bool|Array
Examples
>>> import saiunit as u >>> import jax.numpy as jnp >>> u.math.logical_xor(jnp.array([True, False]), ... jnp.array([True, True])) Array([False, True], dtype=bool)