rasbt/python-machine-learning-book-2nd-edition

Fix for imread not working if scipy version > 1.2.0

Sphagnumshuffle opened this issue · 1 comments

Stumbled upon this error on chapter 15. I found out, that imread is deprecated in scipy versions newer than 1.2.0. So while trying to read an image from png file I encountered error:

AttributeError: module 'scipy.misc' has no attribute 'imread'

You can easily bypass this, just replace
import scipy.misc

with
import imageio

and then read in image like this:
img = imageio.imread('./example-image.png', pilmode='RGB')

Please let me know your opinions about this one

Cheers,

Ville

Sorry, this seems to be fixed already