[SciPy-user] Correct syntax for optimize.fmin_powell

J. Stark jaroslav.stark at imperial.ac.uk
Mon Sep 12 07:24:28 EDT 2005


Can someone point me to the correct syntax for optimize.fmin_powell 
when the objective function takes side arguments. I have tried every 
possibility I can think of, most of which work fine for 
optimize.fmin, but keep getting error messages, mainly due to an 
incorrect number of arguments. I have looked at the source, but that 
hasn't helped.

I am typically trying to something like

def test_arg((x,y),(a,b)):
	return (x-a)**2 + (y-b)**2

min = optimize.fmin_powell(test_arg,(1.0,2.0), ((5.0,6.0),))


This works with optimize.fmin, but fails with optimize.fmin_powell.
Thanks

Jaroslav




More information about the SciPy-User mailing list