[SciPy-Dev] usage of inspect.getargspec ?
Fri Jan 6 08:02:38 CST 2012
On Fri, Jan 6, 2012 at 8:46 AM, Denis Laxalde <email@example.com> wrote:
> firstname.lastname@example.org a écrit :
>> Until now I have seen it mainly in convenience code were it makes it
>> easier for users but that I usually don't use, in this case it is part
>> of essential code.
> I actually thought twice before using getargspec here. But looking at
> scipy sources revealed that it was already part of essential code (stats
> and optimize at least), so I just moved forward.
a quick check:
curve_fit is a convenience wrapper around optimize.leastsq
stats.morestats has it twice in commented out code
2 usages in distributions:
once to check the signature of the internal _stats of subclasses
which has a controlled signature
once to distinguish discrete distributions given by support and
weights from the standard parameterized distributions. I always found
this case confusing and would prefer if the support/weights
distribution were separated from the base class for discrete
distributions also use vectorize and it needed some difficult bug
tracking to get the methods to work because vectorize didn't recognize
the number of parameters as intended
one case in _nonlin_wrapper which I know nothing about since I never used it.
fmin_ncg is a basic library function that handles a pretty wide range
of user defined "callables", and I prefer robustness to having a one
argument shorter signature.
And I agree with Nathaniel, and I also don't see how merging the two
arguments unambiguously can be done in a way that doesn't get more
complicated than the original version
> SciPy-Dev mailing list
More information about the SciPy-Dev