<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 1, 2017 at 7:17 AM, Matthew Rocklin <span dir="ltr"><<a href="mailto:mrocklin@gmail.com" target="_blank">mrocklin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">How would the community handle the scipy.sparse matrix subclasses? These are still in common use.</div></blockquote><div><br></div><div>They're not going anywhere for quite a while (until the sparse ndarrays materialize at least). Hence np.matrix needs to be moved, not deleted. We discussed this earlier this year: <a href="https://mail.python.org/pipermail/numpy-discussion/2017-January/076332.html">https://mail.python.org/pipermail/numpy-discussion/2017-January/076332.html</a></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>Somewhat related: <a href="https://github.com/scipy/scipy/issues/8162" target="_blank">https://github.com/<wbr>scipy/scipy/issues/8162</a></div></div><div class="gmail-HOEnZb"><div class="gmail-h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 30, 2017 at 1:13 PM, <span dir="ltr"><<a href="mailto:josef.pktd@gmail.com" target="_blank">josef.pktd@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Thu, Nov 30, 2017 at 9:23 AM, Marten van Kerkwijk <span dir="ltr"><<a href="mailto:m.h.vankerkwijk@gmail.com" target="_blank">m.h.vankerkwijk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi All,<br>
<br>
I wondered if the move to python3-only starting with numpy 1.17 would<br>
be a good reason to act on what we all seem to agree: that the matrix<br>
class was a bad idea, with its overriding of multiplication and lack<br>
of support for stacks of matrices. </blockquote></span></div></div></div></blockquote></div></div></div></div></blockquote><div><br></div><div>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 core Python devs got 100% right with the Python 3 move: advocate that in the 2->3 transition packages would not make any API changes in order to make porting the least painful.</div><div><br></div><div>Ralf</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><div><br></div></span><div>I don't think the matrix class was a bad idea at the time.</div><div><br></div><div>numpy was the underdog, I came from GAUSS and Matlab and numpy</div><div>arrays were just weird, especially loosing a dimension all the time</div><div>and the heavy required use of np.newaxis.</div><div>I guess nowadays kids don't learn `matrix` languages first anymore.</div><div><br></div><div>recarrays are another half-hearted feature in numpy that is mostly</div><div>obsolete with pandas and pandas_like DataFrames in other</div><div>packages.</div><div><br></div><div><br></div><div>(I don't mind the changes, but the deprecation cycle is often short,</div><div>especially for users like me that update numpy only about every 3 main</div><div>versions.)</div><div><br></div><div>Josef</div><span><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">For 1.17, minimum python supposedly<br>
is >=3.5, so we will be guaranteed to have the matrix multiply<br>
operator @ available, and hence there is arguably even less of a case<br>
for keeping the matrix class; removing it would allow taking out quite<br>
a bit of accumulated special-casing (the immediate reasons for writing<br>
this were gh-10123 and 10132).<br>
<br>
What do people think? If we do go in this direction, we might want to<br>
add PendingDeprecationWarning for 1.15 (maybe DeprecationWarning for<br>
python3; for python2 matrix would never disappear). <br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
All the best,<br>
<br>
Marten<br>
______________________________<wbr>_________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org" target="_blank">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/numpy-discussion</a><br>
</blockquote></span></div><br></div></div>
<br>______________________________<wbr>_________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org" target="_blank">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/numpy-discussion</a><br>
<br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/numpy-<wbr>discussion</a><br>
<br></blockquote></div><br></div></div>