Consider the following example:
import numpy as np
from scipy import ndimage as nd
import matplotlib.pyplot as plt
from skimage import io
%matplotlib inline
url_astronaut = ('https://raw.githubusercontent.com/scikit-image/scikit-image/master/skimage/data/astronaut.png')
image_gridded = io.imread(url_astronaut)
image_gridded[128:-1:128, :] = [0, 0, 255]
image_gridded[:, 128:-1:128] = [0, 0, 255]
plt.imshow(image_gridded);
And the result is
Having np.arange(512)[128:-1:128]
is array([128, 256, 384])
, why don't have blue lines in row 256 and column 256?
This example is from https://github.com/elegant-scipy/notebooks/blob/master/notebooks/ch3.ipynb .
You're code is working fine and the lines are in fact in the image, but they are not shown in the output "preview". If you zoom in to the image, you will see that the blue line appears.