[Numpy-discussion] Changed behavior of np.gradient

Benjamin Root ben.root at ou.edu
Thu Oct 16 21:38:25 EDT 2014

That isn't what I meant. Higher order doesn't "necessarily" mean more
accurate. The results simply have different properties. The user needs to
choose the differentiation order that they need. One interesting effect in
data assimilation/modeling is that even-order differentiation can often
have detrimental effects while higher odd order differentiation are better,
but it is highly dependent upon the model.

This change in gradient broke a unit test in matplotlib (for a new feature,
so it isn't *that* critical). We didn't notice it at first because we
weren't testing numpy 1.9 at the time. I want the feature (I have need for
it elsewhere), but I don't want the change in default behavior.

Ben Root

On Thu, Oct 16, 2014 at 9:31 PM, Nathaniel Smith <njs at pobox.com> wrote:

> On Fri, Oct 17, 2014 at 2:23 AM, Benjamin Root <ben.root at ou.edu> wrote:
> > It isn't really a question of accuracy. It breaks unit tests and
> > reproducibility elsewhere. My vote is to revert to the old behavior in
> > 1.9.1.
> Why would one want the 2nd order differences at all, if they're not
> more accurate? Should we just revert the patch entirely? I assumed the
> change had some benefit...
> --
> Nathaniel J. Smith
> Postdoctoral researcher - Informatics - University of Edinburgh
> http://vorpus.org
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20141016/95a2a75e/attachment.html>

More information about the NumPy-Discussion mailing list