Filter 2d numpy array by condition