Try this code:
x[x[:, 2] == class_number[:, :2]
where x
is np.ndarray
x[:, 2] == class_number
contains true/false
that means whether the last is class_number
or not.
You need to take a look at: Boolean indexing
in http://wiki.scipy.org/Cookbook/Indexing
Moved from comment.