Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My scipy.misc module appears to be missing imsave

I open the python3 interpreter and type

import scipy.misc scipy.misc.imsave 

with the result

Traceback (most recent call last):   File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'imsave' 

Has the name changed? It works fine in python2 but I would rather not migrate backwards so to speak.

I have python 3.3.1 on Lubuntu 13.04 with all the modules downloaded from the default repositories. Scipy is installed and print(scipy.misc.__doc__) shows that imsave should be there.

EDIT:

scipy.__version__ gives 0.11.0

from scipy.misc import imsave gives

Traceback (most recent call last):   File "<stdin>", line 1, in <module> ImportError: cannot import name imsave 
like image 995
Cramer Avatar asked Nov 15 '13 01:11

Cramer


1 Answers

scipy.misc.imsave has been deprecated in newer Scipy versions.

Change your code to:

import imageio imageio.imwrite('filename.jpg', array) 
like image 176
Ivona Tau Avatar answered Oct 26 '22 08:10

Ivona Tau