Re: [Numpy-discussion] proposed changes to array printing in 1.14

2017-06-30 Thread Robert Kern
On Fri, Jun 30, 2017 at 7:23 PM, Juan Nunez-Iglesias wrote: > I do have sympathy for Ralf’s argument that "exact repr's are not part of the NumPy (or Python for that matter) backwards compatibility guarantees”. But it is such a foundational project in Scientific Python that I think extreme care i

Re: [Numpy-discussion] proposed changes to array printing in 1.14

2017-06-30 Thread Nathaniel Smith
On Fri, Jun 30, 2017 at 7:23 PM, Juan Nunez-Iglesias wrote: > I agree that shipping a sane/sanitising doctest runner would go 95% of the > way to alleviating my concerns. > > Regarding 2.0, this is the whole point of semantic versioning: downstream > packages can pin their dependency as 1.x and kn

Re: [Numpy-discussion] proposed changes to array printing in 1.14

2017-06-30 Thread Juan Nunez-Iglesias
I agree that shipping a sane/sanitising doctest runner would go 95% of the way to alleviating my concerns. Regarding 2.0, this is the whole point of semantic versioning: downstream packages can pin their dependency as 1.x and know that they - will continue to work with any updates - won’t make t

Re: [Numpy-discussion] proposed changes to array printing in 1.14

2017-06-30 Thread Robert Kern
On Fri, Jun 30, 2017 at 4:47 PM, Gael Varoquaux < gael.varoqu...@normalesup.org> wrote: > > One problem is that it becomes hard (impossible?) for downstream packages > such as scikit-learn to doctest under multiple versions of the numpy. > Past experience has shown that it could be useful. It's no

Re: [Numpy-discussion] proposed changes to array printing in 1.14

2017-06-30 Thread Gael Varoquaux
One problem is that it becomes hard (impossible?) for downstream packages such as scikit-learn to doctest under multiple versions of the numpy. Past experience has shown that it could be useful. Gaël On Fri, Jun 30, 2017 at 06:30:53PM -0400, Allan Haldane wrote: > On 06/30/2017 09:17 AM, Gael Var

Re: [Numpy-discussion] proposed changes to array printing in 1.14

2017-06-30 Thread Ralf Gommers
On Sat, Jul 1, 2017 at 7:04 AM, CJ Carey wrote: > Is it feasible/desirable to provide a doctest runner that ignores > whitespace? > Yes, and yes. Due to doctest being in the stdlib that is going to take forever to have any effect though; a separate our-sane-doctest module would be the way to shi

Re: [Numpy-discussion] proposed changes to array printing in 1.14

2017-06-30 Thread Allan Haldane
On 06/30/2017 09:17 AM, Gael Varoquaux wrote: > Indeed, for scikit-learn, this would be a major problem. > > Gaël I just ran the scikit-learn tests. With the new behavior (removed whitespace), I do get 70 total failures: $ make test-doc Ran 39 tests in 39.503s FAILED (SKIP=3, failur

Re: [Numpy-discussion] proposed changes to array printing in 1.14

2017-06-30 Thread Allan Haldane
On 06/30/2017 03:04 PM, CJ Carey wrote: > Is it feasible/desirable to provide a doctest runner that ignores > whitespace? That would allow downstream projects to fix their doctests on > 1.14+ with a one-line change, without breaking tests on 1.13. Good idea. I have already implemented this actuall

Re: [Numpy-discussion] proposed changes to array printing in 1.14

2017-06-30 Thread CJ Carey
Is it feasible/desirable to provide a doctest runner that ignores whitespace? That would allow downstream projects to fix their doctests on 1.14+ with a one-line change, without breaking tests on 1.13. On Fri, Jun 30, 2017 at 11:11 AM, Allan Haldane wrote: > On 06/30/2017 03:55 AM, Juan Nunez-Ig

Re: [Numpy-discussion] proposed changes to array printing in 1.14

2017-06-30 Thread Allan Haldane
On 06/30/2017 03:55 AM, Juan Nunez-Iglesias wrote: To reiterate my point on a previous thread, I don't think this should happen until NumPy 2.0. This *will* break a massive number of doctests, and what's worse, it will do so in a way that makes it difficult to support doctesting for both 1.13 a

Re: [Numpy-discussion] proposed changes to array printing in 1.14

2017-06-30 Thread Gael Varoquaux
Indeed, for scikit-learn, this would be a major problem. Gaël On Fri, Jun 30, 2017 at 05:55:52PM +1000, Juan Nunez-Iglesias wrote: > To reiterate my point on a previous thread, I don't think this should happen > until NumPy 2.0. This *will* break a massive number of doctests, and what's > worse,

Re: [Numpy-discussion] proposed changes to array printing in 1.14

2017-06-30 Thread Sebastian Berg
On Fri, 2017-06-30 at 17:55 +1000, Juan Nunez-Iglesias wrote: > To reiterate my point on a previous thread, I don't think this should > happen until NumPy 2.0. This *will* break a massive number of > doctests, and what's worse, it will do so in a way that makes it > difficult to support doctesting

Re: [Numpy-discussion] proposed changes to array printing in 1.14

2017-06-30 Thread Juan Nunez-Iglesias
To reiterate my point on a previous thread, I don't think this should happen until NumPy 2.0. This *will* break a massive number of doctests, and what's worse, it will do so in a way that makes it difficult to support doctesting for both 1.13 and 1.14. I don't see a big enough benefit to these c

Re: [Numpy-discussion] proposed changes to array printing in 1.14

2017-06-29 Thread Marten van Kerkwijk
To add to Allan's message: point (2), the printing of 0-d arrays, is the one that is the most important in the sense that it rectifies a really strange situation, where the printing cannot be logically controlled by the same mechanism that controls >=1-d arrays (see PR). While point 3 can also be

[Numpy-discussion] proposed changes to array printing in 1.14

2017-06-29 Thread Allan Haldane
Hello all, There are various updates to array printing in preparation for numpy 1.14. See https://github.com/numpy/numpy/pull/9139/ Some are quite likely to break other projects' doc-tests which expect a particular str or repr of arrays, so I'd like to warn the list in case anyone has opinions.