📜  numpy index array all except - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:56.087000             🧑  作者: Mango

代码示例1
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])