How to subset a matrix according to some criterion?

Dec. 3, 2017
4:38 p.m.
Hi, I'd like to select the rows of 'data' for which the corresponding elements in 'target' is not 2. Could anybody let know what is the best way (with the least code) to do conditional subsetting like this with numpy objects? Thanks. from sklearn import datasets data, target = datasets.load_iris() -- Regards, Peng
2658
Age (days ago)
2658
Last active (days ago)
1 comments
2 participants
participants (2)
-
Juan Nunez-Iglesias
-
Peng Yu