A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.jax.dev/en/latest/_autosummary/jax.numpy.bitwise_xor.html below:

jax.numpy.bitwise_xor — JAX documentation

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 at jax.numpy.ufunc. This function provides the implementation of the ^ operator for JAX 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_xor explicitly:

>>> x = jnp.arange(4)
>>> jnp.bitwise_xor(x, 1)
Array([1, 0, 3, 2], dtype=int32)

Calling bitwise_xor via the ^ operator:

>>> x ^ 1
Array([1, 0, 3, 2], dtype=int32)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4