[SciPy-user] NameError
Travis Oliphant
oliphant at ee.byu.edu
Mon Apr 10 19:15:00 EDT 2006
Huang, Zhong wrote:
>Hi, I am trying to use least-squares procedure
>of scipy. I encountered NameError problem:
>
>from scipy.optimize import leastsq
>plsq=leastsq(residuals,p0,args(y_meas,x))
>
>NameError: name 'args' is not defined
>
>Could anybody help me out?
>
>
I think you mean:
args = (y_meas, x)
i.e.
plsq=leastsq(residuals,p0,args=(y_meas,x))
-Travis
More information about the SciPy-User
mailing list