I am using scipy.optimize.minimize for my algorithm. I use scipy 0.16.1, Eclpise LUNA and PyDev.
When my code is:
import scipy as sp
optim = sp.optimize.minimize(func,x0 = x0,args = (X,Y,Z))
print optim
print optim.x
The print optim works fine, but I got a warning underlying optimize as: Undefined variable from import: optimize. And I got an error when running the code print optim.x AttributeError: 'tuple' object has no attribute 'x'
However, when I change my code to:
import scipy as sp
import scipy.optimize as spo
optim = spo.minimize(func,x0 = x0,args = (X,Y,Z))
print optim
print optim.x
It works fine. But, I do not have auto completion when I type print optim. for x
So here are my questions:
Why
import scipy as spwithsp.optimize.minimizegives a warning?Why there is no auto completion for
optim.?