module numpy has no attribute unit8 | Edureka Community
www.edureka.co › community › 73005Jun 23, 2020 · But NumPy has no attribute named unit8. You have to use uint8 instead of unit8 in your code. So make changes in your code and try once again. It will work. import sys os sys.path.append (os.pardir) import numpy as np from dataset.mnist import load_mnist from PIL import Image def img_show (img) : pil_img = Image.fromarray (np.uint8 (img)) pil ...