drop anything that isn't nan numpy array code example Example: numpy remove nan rows a[ ~np.isnan(a).any(axis=1),:]