That’s a regression, and it’s on me, in 8762. That was a side effect of a fix for the weird behaviour here <https://github.com/numpy/numpy/pull/8762#issuecomment-286890002>.
I think we need to fix this in 1.13.2, so we should file an issue about it. Eric On Fri, 7 Jul 2017 at 18:31 Matthew Brett <matthew.br...@gmail.com> wrote: > Hi, > > Our (nipy's) test suite just failed with the upgrade to numpy 1.13, > and the cause boiled down to this: > > ``` > import numpy as np > > poly = np.poly1d([1]) > poly.c[0] *= 2 > print(poly.c) > ``` > > Numpy 1.12 gives (to me) expected output: > > [2] > > Numpy 1.13 gives (to me) unexpected output: > > [1] > > The problem is caused by the fact that the coefficients are now a > *copy* of the actual coefficient array - I think in an attempt to stop > us modifying the coefficients directly. > > I can't see any deprecation warnings with `-W always`. > > The pain point here is that code that used to give the right answer > has now (I believe silently) switched to giving the wrong answer. > > Cheers, > > Matthew > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@python.org > https://mail.python.org/mailman/listinfo/numpy-discussion >
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion