I want to do something similar to what was asked here NumPy array, change the values that are NOT in a list of indices, but not quite the same.
Consider a nump
nump
One way is to use a boolean mask and just invert the indices to be false:
mask = np.ones(a.size, dtype=bool) mask[indxs] = False a[mask]