numpy all except index code example
Example: numpy index array all except
In [1]: import numpy as np
In [2]: x = np.array([0,10,20,30,40,50,60])
In [3]: exclude = [1, 3, 5]
In [4]: np.delete(x, exclude)
Out[4]: array([ 0, 20, 40, 60])
In [1]: import numpy as np
In [2]: x = np.array([0,10,20,30,40,50,60])
In [3]: exclude = [1, 3, 5]
In [4]: np.delete(x, exclude)
Out[4]: array([ 0, 20, 40, 60])