This is what numpy.delete does. (It doesn’t modify the input array, so you don’t have to worry about that.)
In [4]: np.delete(x, exclude)
Out[4]: array([ 0, 20, 40, 60])
This is what numpy.delete does. (It doesn’t modify the input array, so you don’t have to worry about that.)
In [4]: np.delete(x, exclude)
Out[4]: array([ 0, 20, 40, 60])