jax.numpy.logical_xor

Contents

jax.numpy.logical_xor#

jax.numpy.logical_xor = <jnp.ufunc 'logical_xor'>#

Compute the logical XOR operation elementwise.

JAX implementation of numpy.logical_xor. This is a universal function, and supports the additional APIs described at jax.numpy.ufunc.

Parameters:
  • x – input arrays. Must be broadcastable to a common shape.

  • y – input arrays. Must be broadcastable to a common shape.

  • args (ArrayLike)

  • out (None)

  • where (None)

Returns:

Array containing the result of the element-wise logical XOR.

Return type:

Any

Examples

>>> x = jnp.arange(4)
>>> jnp.logical_xor(x, 1)
Array([ True, False, False, False], dtype=bool)