logical_or

Contents

logical_or#

class saiunit.math.logical_or(x, y, *args, **kwargs)#

Compute the truth value of x OR y element-wise.

When both inputs are Quantities, y is converted to the unit of x before the operation.

Parameters:
  • x (saiunit.Quantity | Array | ndarray | bool | number | bool | int | float | complex) – First input array.

  • y (saiunit.Quantity | Array | ndarray | bool | number | bool | int | float | complex) – Second input array. Must be broadcastable with x.

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)