if I wanted to create a filter for a numpy array for several values how would I write that.
For instance say I want to do this...
clusters = np.array([4, 570, 56, 2, 5, 1, 1, 570, 32, 1])
fiveseventy_idx = np.where((clusters == 1) | (clusters == 570 ))
clusters = clusters[ fiveseventy_idx ]
In the above case i just want 2 items but say I had a much larger array and I want to filter for n number of items, I don't see how this could be done using this syntax if I had say 300 items I wanted out of the original array.