bitwise_not

Contents

bitwise_not#

class brainunit.math.bitwise_not(x, **kwargs)#

Compute bit-wise NOT, element-wise.

The input must be dimensionless.

Parameters:

x (saiunit.Quantity | Array | ndarray | bool | number | bool | int | float | complex) – Input array of integers or booleans.

Returns:

out – Element-wise bit-wise NOT.

Return type:

Array

Examples

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