def _fitch_intersect(self, arrays):
def pairwise_intersect(arr1, arr2):<EOL><INDENT>s2 = set(arr2)<EOL>b3 = [val for val in arr1 if val in s2]<EOL>return b3<EOL><DEDENT>arrays = list(arrays) <EOL>N = len(arrays)<EOL>while N > <NUM_LIT:1>:<EOL><INDENT>arr1 = arrays.pop()<EOL>arr2 = arrays.pop()<EOL>arr = pairwise_intersect(arr1, arr2)<EOL>arrays.append(arr)<EOL>N = len(arrays)<EOL><DEDENT>return arrays[<NUM_LIT:0>]<EOL>
Find the intersection of any number of 1D arrays.
Return the sorted, unique values that are in all of the input arrays.
Adapted from numpy.lib.arraysetops.intersect1d