[SciPy-User] Derivative in scipy?
Sun Oct 30 12:57:22 CDT 2011
On Sun, Oct 30, 2011 at 12:55 PM, Warren Weckesser <
> On Sun, Oct 30, 2011 at 11:03 AM, <firstname.lastname@example.org> wrote:
>> 2011/10/30 François Boulogne <email@example.com>:
>> > -----BEGIN PGP SIGNED MESSAGE-----
>> > Hash: SHA1
>> > Dear all,
>> > I was wondering if a piece of code has been developped for derivative
>> > calculations, espacially for a sample (array of points) like for
>> > integration:
>> > http://docs.scipy.org/doc/scipy/reference/tutorial/integrate.html with
>> > different methods (right or left first derivatives, second
>> > I didn't succeed in finding this in the documentation. Does it exist? If
>> > not, is it planned by someone?
>> There is one helper function in scipy.optimize
>> (scipy.optimize.optimize), nothing else in scipy.
> Well, not exactly "nothing else"...
> (eat's email arrived as I was typing this, so it will echo some of what he
> Functions that operate on a discrete sample:
> This can be used to compute a derivative by dividing by the appropriate
> power of dx.
> Like numpy.diff, but strictly for 1D arrays. It also provides the
> for specifying values to append to the ends of the array before
> the difference.
> Return the gradient of an n-d array.
> Derivative of a periodic sequence.
> See http://www.scipy.org/Cookbook/KdV for an example.
> Functions that operate on a callable function:
> Find the n-th derivative of a function at point x0.
> Return weights for an Np-point central derivative
Correction: I put this in the wrong list; central_difference_weights is
just a utility function for computing weights (as the name says). It does
not compute derivatives of a callable function.
> No docstring (sigh), but from the source code (use approx_fprime?? in
> ipython), it is pretty easy to figure out what it does.
> Having said that, I think a module specifically for computing derivatives
> (with good docs and tests), as being discussed in the ticket #1510 (
> http://projects.scipy.org/scipy/ticket/1510) would be a nice addition.
>> My standard recommendation for finite differences is numdifftools,
>> it's on pypi. There is a ticket that asks for it's inclusion in scipy,
>> There are some packages on automatic differentiation.
>> (and we have our own hacked together numdiff in statsmodels, just for
>> optimization and Hessian calculations.)
>> > Thanks.
>> > Cheers,
>> > - --
>> > François Boulogne.
>> > Membre de l'April - Promouvoir et défendre le logiciel libre
>> > http://www.april.org
>> > -----BEGIN PGP SIGNATURE-----
>> > Version: GnuPG v1.4.11 (GNU/Linux)
>> > iQIcBAEBAgAGBQJOrXHDAAoJEKkn15fZnrRLxbYP/3/NUzU5metNhGc4tw6Uo0mw
>> > kIlAxf1cvtopbJ+JTXrmKkJpyYUI1bMsqVKpPniW073dgPAfAX3Bajymysh5Hgnd
>> > 5+0hh7v8JmsIvKm9HrEePSrENYrIVTfFyvRV+tBLhkfHJ9Vj7uUy7a3/lyRS6s7v
>> > FEItXLhkNYtqEir8h2eZ7uW178mwq6nBl6Zi5UOjOXq7u0SxcnusKkYyiL+CirSN
>> > KafcrU+rUdHw6khE1exj435GMSKx+N3+rV/kDAQWWQc0ncWmdX2Jr7PapT1DQbNN
>> > b3UK2NjYGDZE2NMRuZmRmeTIk2S+PVPqRxEu0x62CS4Y4JnTaZx1xSiPGP0d9cZC
>> > NG4/9h0LFM8rxj/kxYjBakbIs6LhwPnS1ZvYf00o3eaY4+tLGx3UozoLpEWSCOuQ
>> > GrONTWvdUlfVWsd3qOhwCj+NORkz9yXJNqJHulgz6T8fKnMyPL+R80XfRuS1alxj
>> > m166ySHxrPDzwiSlV5vWR/1ajrEMAI/GYev55dtzlIx6hxfLVCOryFei/LNtlrN+
>> > lYK48QqateqvLDs+NUq+7azmCAkc8fW5UeD7bBLdoGwlXvYaOEZh8+lzxU2sc0T4
>> > 93kNZAzOzv/CdcI1uhnp2NP8ODGEyRLx5cUlcKqmF/iAqtM2zc5Zca9YiygR2w83
>> > XQsGdZYw4rkVMnUTk6Ep
>> > =/Nlz
>> > -----END PGP SIGNATURE-----
>> > _______________________________________________
>> > SciPy-User mailing list
>> > SciPy-User@scipy.org
>> > http://mail.scipy.org/mailman/listinfo/scipy-user
>> SciPy-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User