Or#
Description#
Or applies a logical OR to two aligned input streams: outputs 1.0 when at least one input is nonzero, and 0.0 otherwise. Any nonzero floating-point value (not just 1.0) counts as true.
NaN handling: if either input is NaN at step t, the output is NaN.
Parameters: Or takes no parameters.
Examples#
Usage example#
import numpy as np
from screamer import Or
m1 = np.array([1.0, 0.0, 1.0, 1.0, 0.0, 1.0])
m2 = np.array([1.0, 0.0, 0.0, 1.0, 1.0, 1.0])
print(Or()(m1, m2)) # -> [1. 0. 1. 1. 1. 1.] (1.0 where at least one mask is nonzero)
[1. 0. 1. 1. 1. 1.]