Answers for "numpy index array all except"

0

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])
Posted by: Guest on December-09-2020

Code answers related to "numpy index array all except"

Python Answers by Framework

Browse Popular Code Answers by Language