[SciPy-Dev] Add feature to approx_fprime

Pauli Virtanen pav at iki.fi
Sun Sep 24 16:47:16 EDT 2017


su, 2017-09-24 kello 16:15 -0400, Robert T. McGibbon kirjoitti:
> On Sun, Sep 24, 2017 at 3:52 PM, Pauli Virtanen <pav at iki.fi> wrote:
> 
> > 
> > scipy.optimize currently has a second, more advanced numerical
> > differentiator that it uses internally (see _numdiff.py), which
> > also
> > does multipoint schemes.
> > 
> 
> For people looking for something simple to use in code right now:
> 
> ```
> from scipy.optimize._numdiff import approx_derivative
> ```

Please don't: it's a non-public method (see the leading underscore in
the module name), and it may be removed in any release, and then your
code is broken.

If you want to use it in your own project, you can copy the
`_numdiff.py` file (and what it needs, probably just
_group_columns.pyx), maybe slapping the BSD license blurb from
LICENSE.txt on top.

	Pauli



More information about the SciPy-Dev mailing list