python==3.7.9 Keras==2.2.4 tensorflow==1.13.1
import urllib.request
import tensorflow as tf
import matplotlib.pyplot as plt
import numpy as np
#prox = urllib.request.build_opener()
#urllib.request.install_opener(prox)
from keras.datasets import mnist
(x_train, y_train), (x_test, y_test) = mnist.load_data()
plt.imshow(x_train[0])
En impression normale, le format matriciel est omis et il est écrasé Facilitez la visibilité en spécifiant le nombre de caractères à afficher sur une ligne dans la largeur de ligne
np.set_printoptions(linewidth = 115, precision = 1)
print(x_train[0])
Il peut être affiché en 115 caractères, espaces compris.