Suppose we created a numpy array as follow:
import numpy as np
a= np.array([(5,6,1),(2,9,0),(5,1,0),(9,7,1)])
print(a)
output will be as follow,
[[5 6 1]
[2 9 0]
[5 1 0]
[9 7 1]]
now I want to create a numpy which contain only those rows in which third column is 1.That is my output should be
[[5 6 1]
[9 7 1]]