bitwise_and

Contents

bitwise_and#

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

Compute bit-wise AND 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 AND.

Return type:

Array

Examples

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