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