logical_not

Contents

logical_not#

class saiunit.math.logical_not(x, **kwargs)#

Compute the truth value of NOT x element-wise.

The input must be dimensionless; a TypeError is raised if x carries physical units.

Parameters:

x (saiunit.Quantity | Array | ndarray | bool | number | bool | int | float | complex) – Input array. Must be dimensionless if it is a Quantity.

Returns:

out – Boolean result of the NOT operation applied element-wise.

Return type:

bool | Array

Examples

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