logical_or#
- class brainunit.math.logical_or(x, y, *args, **kwargs)#
Compute the truth value of
x OR 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 OR result.
- Return type:
bool|Array
Examples
>>> import saiunit as u >>> import jax.numpy as jnp >>> u.math.logical_or(jnp.array([True, False]), ... jnp.array([False, False])) Array([ True, False], dtype=bool)