464,806 Members | 1,283 Online
Need help? Post your question and get tips & solutions from a community of 464,806 IT Pros & Developers. It's quick & easy.

# derivative in numpy

 P: n/a 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. Cheers, Kim Jul 28 '08 #1
6 Replies

 P: n/a 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. 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. http://www.scipy.org/Mailing_Lists -- 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 Jul 28 '08 #2

 P: n/a 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? Gary Herron Cheers, Kim -- http://mail.python.org/mailman/listinfo/python-list Jul 28 '08 #3

 P: n/a 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. Cheers, Kim numpy and much more are wrapped together in 'sage' and you should get the functionality you need there. For a review, see: http://vnoel.wordpress.com/2008/05/0...n-thanks-sage/ Jul 28 '08 #4

 P: n/a Gary Herron wrote: kn********@gmail.com wrote: >Hi,I am looking to do a simple derivative. I would expect such a functionto 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 Jul 28 '08 #5

 P: n/a Ken Starks wrote: kn********@gmail.com wrote: >Hi,I am looking to do a simple derivative. I would expect such a functionto 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.Cheers, Kim numpy and much more are wrapped together in 'sage' and you should get the functionality you need there. For a review, see: http://vnoel.wordpress.com/2008/05/0...n-thanks-sage/ Sorry, the review isn't very useful. for something more focused on your request, see: http://www.sagemath.org/doc/tut/node13.html Jul 28 '08 #6

 P: n/a On Jul 28, 5:34*pm, knielse...@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. Cheers, *Kim I presume you are taking the numerical derivative, not the symbolic one. Jul 29 '08 #7

### This discussion thread is closed

Replies have been disabled for this discussion.