为什么第 256 行和第 256 列没有蓝线?

why don't have blue lines in row 256 and column 256?

考虑以下示例:

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);

结果是

np.arange(512)[128:-1:128]array([128, 256, 384]),为什么第256行第256列没有蓝线?

这个例子来自 https://github.com/elegant-scipy/notebooks/blob/master/notebooks/ch3.ipynb .

您的代码运行良好,线条实际上在图像中,但它们未显示在输出中 "preview"。如果放大图像,您会看到蓝线出现。