import numpy as np d=np.random.randn(4,4) array([[ 1.16968447, -0.07650322, -0.30519481, -2.09278839], [ 0.53350868, -0.8004209 , 0.38477468, 1.31876924], [ 0.06461366, 0.82204993, 0.42034665, 0.30473843], [ 1.13469745, -1.47969242, 2.36338208, -0.33700972]])
Allows you to filter all rows that are less than zero in the second column:
d[:,1]<0 array([ True, True, False, True], dtype=bool)
You see, you get a logical array that you can use to select the necessary rows:
d[d[:,1]<0,:] array([[ 1.16968447, -0.07650322, -0.30519481, -2.09278839], [ 0.53350868, -0.8004209 , 0.38477468, 1.31876924], [ 1.13469745, -1.47969242, 2.36338208, -0.33700972]])