[SciPy-User] scipy.optimize named argument inconsistency

josef.pktd at gmail.com josef.pktd at gmail.com
Tue Sep 6 11:46:17 EDT 2011


On Tue, Sep 6, 2011 at 10:53 AM, Denis Laxalde <denis.laxalde at mcgill.ca> wrote:
> I'm glad to see that several people agree on this topic. I will then
> work on standardizing names and orders of parameters and returns
> as well as possible grouping (e.g. for solver statistics).
>
> On Mon, 5 Sep 2011 09:23:41 -0400,
> josef.pktd at gmail.com wrote:
>> It might be a bit messy during deprecation with double names, and
>> there remain different arguments depending on the algorithm, e.g.
>> constraints or not, and if constraints which kind, objective value and
>> derivative in one function or in two.
>
> I guess the case input parameters could be treated by adding new
> parameters and pointing old ones to the latter with a warning. But what
> about returns? For instance, how should one deal with changes of order
> or parameters being grouped with others?
>
> In general, I have little knowledge concerning deprecation mechanisms so
> any advice (or documentation/example pointer) would be welcome.

One possibility, that has been used in numpy.histogram, is to add a
"new=False" or "new=True" keyword, to switch behavior during
transition.

There are usually several warnings.warn for deprecation warnings in
the scipy source but I don't know which are in the current version.

Josef

>
> --
> Denis
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>



More information about the SciPy-User mailing list