I have two NumPy arrays, e.g.:
a = [1,2,3,4,5]
and a filter array, e.g.:
f = [False, True, False, False, True] len(a) == l
NumPy supports boolean indexing
a[f]
This assumes that a and f are NumPy arrays rather than Python lists (as in the question). You can convert with f = np.array(f).
a
f
f = np.array(f)