[SciPy-user] derivative

Nils Wagner nwagner at mecha.uni-stuttgart.de
Wed Feb 23 06:40:25 CST 2005


Hi all,

Is it somehow possible to improve the accuracy of derivative ?
A small example is attached.

 from scipy import *

def func(x):
   return exp(2*x)

for i in arange(1,6):
  print i,' derivative of exp(2*x) at 
x=0',derivative(func,0.0,0.01,i,order=7),'exact',2**i

Any suggestion ?

Nils




More information about the SciPy-user mailing list