derivative in numpy

Robert Kern robert.kern at
Tue Jul 29 00:56:08 CEST 2008

knielsen73 at wrote:
> Hi,
> I am looking to do a simple derivative. I would expect such a function
> to be available in numpy, but can't find it. I have written my own,
> but just curious if anybody knows of such function in numpy.

numpy.diff() handles the discrete difference. All you need to do is supply the 
scaling factor(s) to interpret it as a derivative.

Again, numpy questions are best asked on the numpy mailing list.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

More information about the Python-list mailing list