jax.numpy.bitwise_xor
Contents
jax.numpy.bitwise_xor#
- jax.numpy.bitwise_xor=<jnp.ufunc'bitwise_xor'>#
Compute the bitwise XOR operation elementwise.
JAX implementation of
numpy.bitwise_xor. This is a universal function,and supports the additional APIs described atjax.numpy.ufunc.This function provides the implementation of the^operator forJAX arrays.- Parameters:
x – integer or boolean arrays. Must be broadcastable to a common shape.
y – integer or boolean arrays. Must be broadcastable to a common shape.
args (ArrayLike)
out (None)
where (None)
- Returns:
Array containing the result of the element-wise bitwise XOR.
- Return type:
Any
Examples
Calling
bitwise_xorexplicitly:>>>x=jnp.arange(4)>>>jnp.bitwise_xor(x,1)Array([1, 0, 3, 2], dtype=int32)
Calling
bitwise_xorvia the^operator:>>>x^1Array([1, 0, 3, 2], dtype=int32)
Contents
