jax.numpy.bitwise_or
Contents
jax.numpy.bitwise_or#
- jax.numpy.bitwise_or=<jnp.ufunc'bitwise_or'>#
Compute the bitwise OR operation elementwise.
JAX implementation of
numpy.bitwise_or. 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 OR.
- Return type:
Any
Examples
Calling
bitwise_orexplicitly:>>>x=jnp.arange(4)>>>jnp.bitwise_or(x,1)Array([1, 1, 3, 3], dtype=int32)
Calling
bitwise_orvia the|operator:>>>x|1Array([1, 1, 3, 3], dtype=int32)
Contents
