[Numpy-discussion] what is the point of dx for np.gradient()?

Benjamin Root ben.root at ou.edu
Sat Nov 5 12:37:06 EDT 2011

On Fri, Nov 4, 2011 at 1:20 PM, Benjamin Root <ben.root at ou.edu> wrote:

> For np.gradient(), one can specify a sample distance for each axis to
> apply to the gradient.  But, all this does is just divides the gradient by
> the sample distance.  I could easily do that myself with the output from
> gradient.  Wouldn't it be more valuable to be able to specify the width of
> the central difference (or is there another function that does that)?
> Thanks,
> Ben Root

Nevermind, I should have realized the difficulty in coordinating the
various divisions when dealing with multiple dimensions.

My other question remains, though.  Is there a function somewhere that
allows me to perform central differences of varying widths.  Preferably
something that works with masks?

Ben Root
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20111105/8df8fed3/attachment.html>

More information about the NumPy-Discussion mailing list