removing pairs of elements from numpy arrays that are nan (or another value) in python,a[~np.isnan(a).any(1)]