Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #numpy #index #array
ADD COMMENT
Topic
Name
2+8 =