[SciPy-user] optimize.fsolve

Howey, David A d.howey at imperial.ac.uk
Thu Aug 18 09:26:07 CDT 2005

thanks for all your help Ryan and Brett.

I have now got fsolve working in my code. You won't believe how overjoyed I am!!! (the simple things in life, eh..)

one more general python question relating to parameter passing. With routines like fsolve, the additional arguments for the user-defined function are passed in in a tuple, eg
args = (80000, 80000, 12.7)

is it possible to do a hack to call the function directly, eg something like
answer = myfunc(x, args)

.. this doesn't work, but is there some kind of 'unpack' or something which will make the function think it's just getting positional arguments instead of a tuple?

There must be a way, otherwise how would fsolve (etc etc) work?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 2653 bytes
Desc: not available
Url : http://www.scipy.net/pipermail/scipy-user/attachments/20050818/d404f954/attachment.bin

More information about the SciPy-user mailing list