<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 30, 2020 at 1:09 PM Eric Wieser <<a href="mailto:wieser.eric%2Bnumpy@gmail.com">wieser.eric+numpy@gmail.com</a>> wrote:<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 style="font-size:1em;font-family:Helvetica,arial,freesans,clean,sans-serif;color:rgb(34,34,34);background-color:rgb(255,255,255);border:medium none;line-height:1.2"><p style="margin:1em 0px">Hi all,</p>
<p style="margin:1em 0px">Just a heads up that in <a href="https://github.com/numpy/numpy/pull/15867" style="color:rgb(51,51,238);text-decoration:none" target="_blank">https://github.com/numpy/numpy/pull/15867</a> I plan to deprecate <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">ndarray.tostring()</code>, which is just a confusing way to spell <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">ndarray.tobytes()</code>.</p>
<p style="margin:1em 0px">This function has been documented as a compatibility alias since NumPy 1.9, but never emitted a warning upon use.<br>Given <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">array.array.tostring()</code> has been warning as far back as Python 3.1, it seems like we should follow suit.</p>
<p style="margin:1em 0px">In order to reduce the impact of such a deprecation, I’ve filed the necessary scipy PR: <a href="https://github.com/scipy/scipy/pull/11755" style="color:rgb(51,51,238);text-decoration:none" target="_blank">https://github.com/scipy/scipy/pull/11755</a>.<br>It’s unlikely we’ll remove this function entirely any time soon, but the act of deprecating it may cause a few failing CI runs in projects where warnings are turned into errors.</p></div></div></blockquote><div><br></div><div>+1 agree with the deprecation, and with making it a long one given the handful of uses in Matplotlib and several handfuls in SciPy.</div><div><br></div><div>Cheers,<br></div><div>Ralf</div><div><br></div></div></div>