I am wondering if there is a more efficient way to run the comparison (or really many other functions) using numpy.
a = np.array([1,2,5,7])
b = np.array([0,4,6])
np.repeat(a, len(b)).reshape(-1, len(b)) > b
> array([[ True, False, False],
[ True, False, False],
[ True, True, False],
[ True, True, True]])
Basically each output (m, n) is the comparison if A_m
> B_n