jax.lax.bitwise_xor#
- jax.lax.bitwise_xor(x, y)[source]#
Elementwise exclusive OR: \(x \oplus y\).
This function lowers directly to the stablehlo.xor operation.
- Parameters:
x (ArrayLike) – Input arrays. Must have matching boolean or integer dtypes. If neither is a scalar,
xandymust have the same number of dimensions and be broadcast compatible.y (ArrayLike) – Input arrays. Must have matching boolean or integer dtypes. If neither is a scalar,
xandymust have the same number of dimensions and be broadcast compatible.
- Returns:
An array of the same dtype as
xandycontaining the bitwise XOR of each pair of broadcasted entries.- Return type:
See also
jax.numpy.bitwise_xor(): NumPy wrapper for this API, also accessible via thex ^ yoperator on JAX arrays.jax.lax.bitwise_not(): Elementwise NOT.jax.lax.bitwise_and(): Elementwise AND.jax.lax.bitwise_or(): Elementwise OR.