[Numpy-discussion] Changed behavior of np.gradient

Charles R Harris charlesr.harris at gmail.com
Thu Oct 16 22:31:47 EDT 2014

On Thu, Oct 16, 2014 at 8:25 PM, Matthew Brett <matthew.brett at gmail.com>

> Hi,
> On Thu, Oct 16, 2014 at 6:38 PM, Benjamin Root <ben.root at ou.edu> wrote:
> > 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.
> I think it would be a bad idea to revert now.
> I suspect, if you revert, then a lot of other code will assume the <
> 1.9.0, >= 1.9.1  behavior.  In that case, the code will work as
> expected most of the time, except when combined with 1.9.0, which
> could be seriously surprising, and often missed.   If you keep the new
> behavior, then it will be clearer that other code will have to adapt
> to this change >= 1.9.0 - surprise, but predictable surprise, if you
> see what I mean...

1.9.1 will be out in a week or so. To be honest, these days I regard the
1.x.0 releases as sort of an advanced release candidate. I think there are
just a lot more changes going in between releases and the release gets a
lot more testing than the official release candidates.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20141016/9a648034/attachment.html>

More information about the NumPy-Discussion mailing list