Say I have an image array:
raster.shape => (3,100,100)
I generate a mask of all the places where red is saturated:
mask = np.where(raster[0,:,:] == 255)
I want to modify the slice of those locations... Which I can do like this:
raster[:,mask[0],mask[1]] = 0
Is there a more pythonic way... or is this the best bet?