[SciPy-Dev] PR #196: simplification of optimization wrappers

josef.pktd@gmai... josef.pktd@gmai...
Wed Apr 18 19:47:49 CDT 2012


On Wed, Apr 18, 2012 at 8:23 PM, Gustavo Goretkin
<gustavo.goretkin@gmail.com> wrote:
> If I recall correctly, a similar approach is used in CVXOPT.
>
> On Apr 18, 2012 4:38 PM, "Pauli Virtanen" <pav@iki.fi> wrote:
>>
>> Hi,
>>
>> 18.04.2012 22:26, Denis Laxalde kirjoitti:
>> > In pull request #196, I am proposing to simplify the signature of
>> > optimization wrappers (minimize, minimize_scalar, etc.) to get
>> > something like:
>> >
>> >   x, info = minimize(fun, x0, [jac, constraints], options)
>>
>> How about going even further, and not even returning `x`. Rather, stuff
>> it inside `info`:
>>
>>    sol = minimize(fun, x0, [jac, constraints], options)
>>    x = sol.x
>>
>> Just change the solution object to a dict subclass with attribute
>> accessors, and you're done.
>>
>> And maybe even add `def __array__(self): return self.x`, so you can do
>> `asarray(sol)`?

What's the overhead of retall, especially fmin with a few thousand iterations?
The rest of info looks all calculated as a byproduct, so there
shouldn't be much extra cost, is there?

I don't think I ever used or looked at retall.

Josef


>>
>>        Pauli
>>
>> _______________________________________________
>> SciPy-Dev mailing list
>> SciPy-Dev@scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>


More information about the SciPy-Dev mailing list