[SciPy-user] Derivative() usage?

Francesc Alted falted at pytables.org
Thu Oct 21 11:03:24 CDT 2004


I'm trying to figure out how to compute the derivatives of a function with
scipy, but the documentation is a bit terse for me:

def derivative(func,x0,dx=1.0,n=1,args=(),order=3):
    """Given a function, use an N-point central differenece
       formula with spacing dx to compute the nth derivative at
       x0, where N is the value of order and must be odd.

       Warning: Decreasing the step size too small can result in
       round-off error.

I would like to compute a derivative of an arbitrary order, but by reading
the docs, I'm not sure what the n and order parameters exactly means.

Someone smarter than me can help me?

Francesc Alted

More information about the SciPy-user mailing list