bitwise_or

Contents

bitwise_or#

class brainunit.math.bitwise_or(x, y, **kwargs)#

Compute bit-wise OR of two arrays, element-wise.

Both inputs must be dimensionless.

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

  • y (saiunit.Quantity | Array | ndarray | bool | number | bool | int | float | complex) – Second input.

Returns:

out – Element-wise bit-wise OR.

Return type:

Array

Examples

>>> import saiunit as u
>>> import jax.numpy as jnp
>>> u.math.bitwise_or(jnp.array([True, False]),
...                    jnp.array([False, False]))
Array([ True, False], dtype=bool)