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