[SciPy-user] Correct syntax for optimize.fmin_powell

Nils Wagner nwagner at mecha.uni-stuttgart.de
Tue Sep 13 08:32:20 EDT 2005


Dan Christensen wrote:
>Robert Kern <rkern at ucsd.edu> writes:
>
>  
>>Dan Christensen wrote:
>>
>>    
>>>TypeError: test_arg() takes exactly 2 arguments (3 given)
>>>      
>>Could you also copy-and-paste the code that you ran to yield this error?
>>Because it looks to me like you may have executed
>>
>>  min = optimize.fmin_powell(test_arg,(1.0,2.0), (5.0,6.0))
>>
>>instead.
>>    
>
>Nope, I copy-and-pasted the code from your message.
>
>And I've also had this bug affect me in completely different code
>as well.  Just like the original poster, args works fine for all
>the other fmin* routines, but not for fmin_powell.
>
>Dan
>
>_______________________________________________
>SciPy-user mailing list
>SciPy-user at scipy.net
>http://www.scipy.net/mailman/listinfo/scipy-user
>  
python -i powell.py results in

Optimization terminated successfully.
         Current function value: 0.000000
         Iterations: 2
         Function evaluations: 22
>>>

>>> min
array([ 5.,  6.])


BTW

>>> scipy.__version__
'0.3.3_309.4626'

Nils



 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: powell.py
Type: text/x-python
Size: 137 bytes
Desc: not available
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20050913/0cb21012/attachment.py>


More information about the SciPy-User mailing list