logical_and#
- class brainunit.math.logical_and(x, y, *args, **kwargs)#
Compute the truth value of
x AND yelement-wise.When both inputs are Quantities,
yis converted to the unit ofxbefore the operation.- Parameters:
x (saiunit.Quantity |
Array|ndarray|number|bool) – First input array.y (saiunit.Quantity |
Array|ndarray|number|bool) – Second input array. Must be broadcastable withx.
- Returns:
out – Boolean AND result.
- Return type:
bool|Array
Examples
>>> import saiunit as u >>> import jax.numpy as jnp >>> u.math.logical_and(jnp.array([True, False]), ... jnp.array([True, True])) Array([ True, False], dtype=bool)