plt.imshow typeerror Неверные размеры для данных изображения

if image.shape[2] == 1:
    image = image[:, :, 0]
return image
Merwanski