Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Gael Varoquaux
> - There are major projects like scikit-learn that simply have no > alternative to using np.matrix, because of scipy.sparse. Well, we have no love for np.matrix, we just use scipy.sparse and np.ndarray. > - After there's an alternative to scipy.sparse: +1 for alternative to scipy.sparse before

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Marten van Kerkwijk
Hi Nathaniel, Thanks for the concrete suggestion: see https://github.com/numpy/numpy/pull/10142 I think this is useful independent of exactly how the eventual move to a new package would work; next step might be to collect all matrix tests in the `libmatrix` sub-module. All the best, Marten

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Stefan van der Walt
On Thu, Nov 30, 2017, at 16:15, Nathaniel Smith wrote: > PendingDeprecationWarning in np.matrix.__init__ (unless it kills > performance for scikit-learn and friends), and put a big warning box > at the top of the docs. The idea here is to not actually break > anyone's code, but start to get out the

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Nathaniel Smith
On Thu, Nov 30, 2017 at 11:39 AM, Charles R Harris wrote: > > > On Thu, Nov 30, 2017 at 11:43 AM, Ralf Gommers > wrote: >> I'd suggest any release in the next couple of years is fine,but the one >> where we drop Python 2 support is probably the worst choice. That's one of >> the few things the co

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Feng Yu
An NEP on utility functions for structured array definitely sounds appealing to me. On Thu, Nov 30, 2017 at 2:00 PM, Stefan van der Walt wrote: > On Thu, Nov 30, 2017, at 12:02, Marten van Kerkwijk wrote: >> I think Josef specifically meant `recarrays`, which give access to >> elements of a struc

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Marten van Kerkwijk
Unlike for matrix, it is not so much a problem as an unclear use case - the main thing they bring to structured dtype arrays is access by attribute, which is slower than just doing getting the field by its key. Anyway, I don't think anybody is suggesting to remove them - they're not a problem in th

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Eric Firing
On 2017/11/30 12:00 PM, Stefan van der Walt wrote: I think Josef specifically meant `recarrays`, which give access to elements of a structured array via attribute access. I'd tend to agree with him that those turned out not to be such a great idea. But (I I have found recarrays to be useful, pr

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Stefan van der Walt
On Thu, Nov 30, 2017, at 12:02, Marten van Kerkwijk wrote: > I think Josef specifically meant `recarrays`, which give access to > elements of a structured array via attribute access. I'd tend to agree > with him that those turned out not to be such a great idea. But (I > think) nobody is arguing we

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Marten van Kerkwijk
On Thu, Nov 30, 2017 at 2:51 PM, Stefan van der Walt wrote: > On Thu, Nov 30, 2017, at 10:13, josef.p...@gmail.com wrote: > > recarrays are another half-hearted feature in numpy that is mostly > obsolete with pandas and pandas_like DataFrames in other > packages. > > > I'm fully on board with fact

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Marten van Kerkwijk
Hi Ralf, Sorry not to have recalled the previous thread. Your point about not doing things in the python 2->3 move makes sense; handy for me is no reason to give users an incentive not to move to python3 because their matrix-dependent code breaks. It does sound like, given the use of sparse, a s

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Stefan van der Walt
On Thu, Nov 30, 2017, at 11:39, Charles R Harris wrote: > Agree, we don't want to pile in too many changes at once. I think the big > sticking point is the sparse matrices in SciPy, even issuing a > DeprecationWarning could be problematic as long as there are sparse matrices. Could you explain w

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Stefan van der Walt
On Thu, Nov 30, 2017, at 10:13, josef.p...@gmail.com wrote: > recarrays are another half-hearted feature in numpy that is mostly > obsolete with pandas and pandas_like DataFrames in other > packages. I'm fully on board with factoring out np.matrix into a subpackage. But I would not touch structure

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Charles R Harris
On Thu, Nov 30, 2017 at 11:43 AM, Ralf Gommers wrote: > > > On Fri, Dec 1, 2017 at 7:17 AM, Matthew Rocklin > wrote: > >> How would the community handle the scipy.sparse matrix subclasses? These >> are still in common use. >> > > They're not going anywhere for quite a while (until the sparse nd

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Ralf Gommers
On Fri, Dec 1, 2017 at 7:17 AM, Matthew Rocklin wrote: > How would the community handle the scipy.sparse matrix subclasses? These > are still in common use. > They're not going anywhere for quite a while (until the sparse ndarrays materialize at least). Hence np.matrix needs to be moved, not de

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Matthew Rocklin
How would the community handle the scipy.sparse matrix subclasses? These are still in common use. Somewhat related: https://github.com/scipy/scipy/issues/8162 On Thu, Nov 30, 2017 at 1:13 PM, wrote: > > > On Thu, Nov 30, 2017 at 9:23 AM, Marten van Kerkwijk < > m.h.vankerkw...@gmail.com> wrote

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread josef . pktd
On Thu, Nov 30, 2017 at 9:23 AM, Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > Hi All, > > I wondered if the move to python3-only starting with numpy 1.17 would > be a good reason to act on what we all seem to agree: that the matrix > class was a bad idea, with its overriding of multip

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Ilhan Polat
This would be really good to remove the apparent confusion. Moreover, I think cleanly explaining why using "np.matrix" is not a good idea *before* announcing the news would encourage people to accept this decision along the way. That would greatly reduce the sporadic "the devs are deprecating stuff

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Marten van Kerkwijk
Moving to a subpackage may indeed make more sense, though it might not help as much with getting rid of the hacks inside other parts of numpy to keep matrix working. In that respect it seems a bit different at least from weave. Then again, independently of whether we remove or release a separate p

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Bryan Van de ven
This is exactly what we did with the bokeh.charts deprecation. Moving to a separate projects was both a huge relief for the developers as well as a great way to focus and clarify expectations for users. Bryan > On Nov 30, 2017, at 10:20, Chris Laumann wrote: > > +1 (not that my lurking vot

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Chris Laumann
+1 (not that my lurking vote should necessarily carry much weight). Rip it out asap. The existence of the matrix class has been literally the single biggest source of confusion and subtle bugs in my and my students' codes for years. Best, Chris > On Nov 30, 2017, at 9:23 AM, Marten van Kerkwi

Re: [Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Todd
On Nov 30, 2017 09:24, "Marten van Kerkwijk" wrote: Hi All, I wondered if the move to python3-only starting with numpy 1.17 would be a good reason to act on what we all seem to agree: that the matrix class was a bad idea, with its overriding of multiplication and lack of support for stacks of ma

[Numpy-discussion] Deprecate matrices in 1.15 and remove in 1.17?

2017-11-30 Thread Marten van Kerkwijk
Hi All, I wondered if the move to python3-only starting with numpy 1.17 would be a good reason to act on what we all seem to agree: that the matrix class was a bad idea, with its overriding of multiplication and lack of support for stacks of matrices. For 1.17, minimum python supposedly is >=3.5,