aboutsummaryrefslogtreecommitdiffstats
path: root/Helpers/logical_helpers.py
blob: 1b43ebcafd3617ee702c6e62676c6819e634b391 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"""
Boolean Helper Functions for Element-Wise Ops on >2 Arrays.
"""

import numpy as np

def xlogical_and(arr):
    """Element-Wise .AND. Operation Over All Arrays."""
    for iarr in range(len(arr)):
        if iarr == 0:
            tmp = arr[0]
        else:
            tmp = np.logical_and(tmp, arr[iarr])
    return tmp