[Numpy-discussion] Second order gradient in numpy

Chris Barker chris.barker at noaa.gov
Thu May 1 19:01:37 EDT 2014

On Thu, May 1, 2014 at 3:42 PM, Christian K. <ckkart at hoc.net> wrote:

> It looks like you are looking for the derivative rather than the
> gradient. Have a look at:
> np.diff(a, n=1, axis=-1)
> n is the order if the derivative.

depending on your use case, you may want to use a polynomial fit for a
higher order derivative:




Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140501/10f71234/attachment.html>

More information about the NumPy-Discussion mailing list