[SciPy-dev] optimize.fmin_tnc TypeError: argument 2 must be list, not numpy.ndarray

Nils Wagner nwagner at iam.uni-stuttgart.de
Wed Oct 25 07:43:50 CDT 2006


The optimizer tnc requires a list for the second argument. All other
optimizers work with an array.
For what reason ?

    xopt = optimize.fmin_tnc(P_A,x0,P_Ap)
  File "/usr/lib64/python2.4/site-packages/scipy/optimize/tnc.py", line
221, in fmin_tnc
    fmin, ftol, rescale)
TypeError: argument 2 must be list, not numpy.ndarray
>>> type(x0)
<type 'numpy.ndarray'>

Nils



More information about the Scipy-dev mailing list