scipy.misc module has no attribute imread?

imread is deprecated in SciPy 1.0.0, and will be removed in 1.2.0.
Use imageio.imread instead.

import imageio
im = imageio.imread('astronaut.png')
im.shape  # im is a numpy array
(512, 512, 3)
imageio.imwrite('imageio:astronaut-gray.jpg', im[:, :, 0])

Leave a Comment