I have a large set of data in which I need to compare the distances of a set of samples from this array with all the other elements of the array. Below is a very simple exa
I'm not familiar with the specifics on numpy, but here's a general solution. Suppose you have the following list:
a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].
You create another list of indices you don't want:
inds = [1, 3, 6].
Now simply do this:
good_data = [x for x in a if x not in inds], resulting in good_data = [0, 2, 4, 5, 7, 8, 9].