[SciPy-user] Derivative() usage?

David Grant david at dwavesys.com
Wed Nov 3 17:44:33 CST 2004


David Grant wrote:

> Robert Kern wrote:
>
>> Giovanni Samaey wrote:
>>
>>>
>>>>
>>>> 'n' as in d^n/dx^n .
>>>>
>>>> Somewhat confusingly, 'N' is being used in the docstring as a 
>>>> synonym for 'order' and is the number of discrete points used to 
>>>> evaluate the numerical derivative. I'm going to fix that.
>>>>
>>>> For example, when n=2, and order=3, one is computing the second 
>>>> central derivative using 3 points [x0-dx, x0, x0+dx].
>>>
>>>
>>>
>>>
>>> Normally, one would expect "order" to be an indication of the 
>>> accuracy of the derivative.  So, order=p should mean
>>> d^n/dx^n (exact answer) - (what's computed) = O(dx^p) where dx is 
>>> the mesh spacing.
>>> Clearly, with three points for the second derivative, the order is 
>>> only two, so this is clearly not a mathematically correct use of the 
>>> word "order"...
>>
>>
>>
>> Not really. "Order" is an incredibly overloaded word in this area. 
>> Its usage here is one of several acceptable ones. "numpoints" may be 
>> clearer, though.
>>
> Where is the derivative function in scipy?
>
doh, found it.  It would be nice if the api docs page had an index of 
all functions, instead of having to "guess" that it was in common and 
clicking there.



More information about the SciPy-user mailing list