Я пытаюсь загрузить и визуализировать цифры MNIST, но я получаю цифры со смещенным пикселем
import matplotlib.pyplot as plt
import numpy as np
mnist_data = open('data/mnist/train-images-idx3-ubyte', 'rb')
image_size = 28
num_images = 4
buf = mnist_data.read(num_images * image_size * image_size)
data = np.frombuffer(buf, dtype=np.uint8).astype(np.float32)
data = data.reshape(num_images, image_size, image_size)
_, axarr1 = plt.subplots(2,2)
axarr1[0, 0].imshow(data[0])
axarr1[0, 1].imshow(data[1])
axarr1[1, 0].imshow(data[2])
axarr1[1, 1].imshow(data[3])

Может кто-нибудь сказать мне, почемукод происходит нормально, спасибо