<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 7, 2017 at 2:52 PM, Charles R Harris <span dir="ltr"><<a href="mailto:charlesr.harris@gmail.com" target="_blank">charlesr.harris@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Fri, Jan 6, 2017 at 6:37 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><span>On Fri, Jan 6, 2017 at 8:28 PM, Ralf Gommers <span dir="ltr"><<a href="mailto:ralf.gommers@gmail.com" target="_blank">ralf.gommers@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Sat, Jan 7, 2017 at 2:21 PM, CJ Carey <span dir="ltr"><<a href="mailto:perimosocordiae@gmail.com" target="_blank">perimosocordiae@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span><br><div class="gmail_quote">On Fri, Jan 6, 2017 at 6:19 PM, Ralf Gommers <span dir="ltr"><<a href="mailto:ralf.gommers@gmail.com" target="_blank">ralf.gommers@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 class="gmail_extra"><div class="gmail_quote"><div>This sounds like a reasonable idea. Timeline could be something like:<br><br></div><div>1. Now: create new package, deprecate np.matrix in docs.<br></div><div>2. In say 1.5 years: start issuing visible deprecation warnings in numpy<br></div><div>3. After 2020: remove matrix from numpy.<span class="m_-2737980850436192962m_8816747292437927648m_4354469266491942499m_-6206273829424229708gmail-HOEnZb"><font color="#888888"><br></font></span></div></div><span class="m_-2737980850436192962m_8816747292437927648m_4354469266491942499m_-6206273829424229708gmail-HOEnZb"><font color="#888888"><br></font></span></div><span class="m_-2737980850436192962m_8816747292437927648m_4354469266491942499m_-6206273829424229708gmail-HOEnZb"><font color="#888888"><div class="gmail_extra">Ralf</div></font></span></blockquote></div><br></span>I think this sounds reasonable, and reminds me of the deliberate deprecation process taken for scipy.weave. I guess we'll see how successful it was when 0.19 is released.</div><div class="gmail_extra"><br></div><div class="gmail_extra">The major problem I have with removing numpy matrices is the effect on scipy.sparse, which mostly-consistently mimics numpy.matrix semantics and often produces numpy.matrix results when densifying. The two are coupled tightly enough that if numpy matrices go away, all of the existing sparse matrix classes will have to go at the same time.</div><div class="gmail_extra"><br></div><div class="gmail_extra">I don't think that would be the end of the world, </div></div></blockquote><div><br></div></span><div>Not the end of the world literally, but the impact would be pretty major. I think we're stuck with scipy.sparse, and may at some point will add a new sparse *array* implementation next to it. For scipy we will have to add a dependency on the new npmatrix package or vendor it.<span class="m_-2737980850436192962m_8816747292437927648HOEnZb"><font color="#888888"><br></font></span></div></div></div></div></blockquote><div><br></div></span><div>That sounds to me like moving maintenance of numpy.matrix from numpy to scipy, if scipy.sparse is one of the main users and still depends on it.<span class="m_-2737980850436192962HOEnZb"><font color="#888888"><br></font></span></div></div></div></div></blockquote></span></div></div></div></blockquote><div><br></div><div>Maintenance costs are pretty low, and are partly still for numpy (it has to keep subclasses like np.matrix working. I'm not too worried about the effort. The purpose here is to remove np.matrix from numpy so beginners will never see it. Educating sparse matrix users is a lot easier, and there are a lot less such users.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><span class="m_-2737980850436192962HOEnZb"><font color="#888888"></font></span></div></div></div></div></blockquote><div></div></span><div>What I was thinking was encouraging folks to use `arr.dot(...)` or `@` instead of `*` for matrix multiplication, keeping `*` for scalar multiplication. </div></div></div></div></blockquote><div><br></div><div>I don't think that change in behavior of `*` is doable.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>If those operations were defined for matrices,</div></div></div></div></blockquote><div><br></div><div>Why if? They are defined, and work as expected as far as I can tell.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> then at some point sparse could go to arrays and it would not be noticeable except for the treatment of 1-D arrays -- which admittedly might be a bit tricky.<br></div></div></div></div>
</blockquote></div><br></div><div class="gmail_extra">I'd like that to be feasible, but especially given that any such change would not break code but rather silently change numerical values, it's likely not a healthy idea.<br><br></div><div class="gmail_extra">Ralf<br><br></div></div>