Not#
Description#
Not applies a logical NOT to a single input stream: outputs 0.0 when the input is nonzero, and 1.0 when the input is zero. Any nonzero floating-point value (not just 1.0) counts as true.
NaN handling: NaN input yields NaN output.
Parameters: Not takes no parameters.
Examples#
Usage example#
import numpy as np
from screamer import Not
m = np.array([1.0, 0.0, 1.0, 1.0, 0.0, 1.0])
print(Not()(m)) # -> [0. 1. 0. 0. 1. 0.] (flips the mask: 1.0 where the input is zero)
[0. 1. 0. 0. 1. 0.]