jax.numpy.logical_and — JAX documentation (original) (raw)

jax.numpy.logical_and#

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

Compute the logical AND operation elementwise.

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

Parameters:

Returns:

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

Return type:

Any

Examples

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