For combining two lists of booleans based on OR, np.logical_or
can be used, and similarity AND can be done with np.logical_and
.
However, if I have a list of 10 lists of boolean values and want to combine them using either AND or OR, I cannot find an easy way to do this.
Could you please suggest the most efficient way?
EDIT:
booleans = [[True, True, False, True, False], [True, False, False, False, False], [True, False, False, False, False]]
OR output: [True, True, False, True, False]
AND output: [True, False, False, False, False]
Thanks, Jack