[SciPy-dev] scipy.optimize.nonlin rewrite
Mon Dec 1 02:28:15 CST 2008
Sun, 30 Nov 2008 21:59:32 -0500, Anne Archibald wrote:
> 2008/11/30 Gideon Simpson <firstname.lastname@example.org>:
>> Still no args input for inputting arguments to the function F?
>> Sorry to complain, but the absence of this has put me off using these
>> routines as it would require a rewrite of much of my code.
> Instead of
> optimize.whatever(F, args=extra)
> just use
> optimize.whatever(lambda x: F(x,extra))
Exactly; I was under the impression that this 'args' business was some
legacy from times when Python didn't support nested scopes, cf. eg.
I don't see a need for the 'args' option except maybe for conformance
with the other optimization functions in Scipy. But maybe there are also
other reasons to include it?
More information about the Scipy-dev