Gary Herron wrote:

kn********@gmail.com 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.

Derivatives are a property of functions. Since numpy provides

representations of arrays not functions, how would you expect this to work?

To be more concrete, what you you expect the derivative of

[ [ 1 2 ]

[ 3 4 ]

]

to be?

Or do you have in mind some array representation of the coefficients of

a function of some pre-defined type - like a polynomial?

Typically, when people ask questions like this, they have a uniform, discretely

sampled version of the function, and they want the

(forward,central,backward)-difference approximation of the derivative.

--

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