<html xmlns="http://www.w3.org/1999/xhtml"><head> <title></title> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> </head> <body style="font-family:Helvetica;color:#000000;font-size:13px;"><div id="CanaryBody"> <div> Hi all</div><div><br></div> </div> <div id="CanaryDropbox"> </div> <blockquote id="CanaryBlockquote"> <div> <div>On Friday, Oct 19, 2018 at 10:28 AM, Matti Picus <<a href="mailto:matti.picus@gmail.com">matti.picus@gmail.com</a>> wrote:<br></div> <div bidimailui-charset-is-forced="true" style="direction: ltr;" text="#000000" bgcolor="#FFFFFF"> <p>Was there discussion around which of `asarray` or asanyarray` to prefer? PR 11162, <a class="moz-txt-link-freetext" href="https://github.com/numpy/numpy/pull/11162">https://github.com/numpy/numpy/pull/11162</a>, proposes `asanyarray` in place of `asarray` at the entrance to `<span class="blob-code-inner blob-code-marker-context"><span class="pl-en">_quantile_ureduce_func` to preserve ndarray subclasses. Should we be looking into changing all the `asarray` calls into `asanyarray`?</span></span></p></div></div></blockquote>I suspect that this will cause a large number of problems around np.matrix, so unless we deprecate that, this might cause a large amount of problems. The problem with np.matrix is that it’s a subclass, but it’s not substitutable for the base class, and so violates SOLID.<div><br></div><div>There are efforts to remove np.matrix, with the largest consumer being scipy.sparse, so unless that’s revamped, deprecating np.matrix is kind of hard to do.<br><div><blockquote><div><div bidimailui-charset-is-forced="true" style="direction: ltr;" text="#000000" bgcolor="#FFFFFF"> <p><span class="blob-code-inner blob-code-marker-context"><span class="pl-en"><br> </span></span></p> <p><span class="blob-code-inner blob-code-marker-context"><span class="pl-en">Matti<br> </span></span></p> <p><span class="blob-code-inner blob-code-marker-context"><span class="pl-en"></span></span></p> _______________________________________________ <br>NumPy-Discussion mailing list <br>NumPy-Discussion@python.org <br>https://mail.python.org/mailman/listinfo/numpy-discussion <br></div></div></blockquote><br> <div><div>Best Regards,<div>Hameer Abbasi</div></div></div></div></div><img id="0AA2F71BCE81061FE6FE848FD620D464" width="1px" src="http://pixels.canarymail.io:8100/track/977C99C0645380AF45E168B4CDA443F5_0AA2F71BCE81061FE6FE848FD620D464.png" height="1px"></body></html>