<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 22, 2015 at 5:47 PM, Chris Barker - NOAA Federal <span dir="ltr"><<a href="mailto:chris.barker@noaa.gov" target="_blank">chris.barker@noaa.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><span class=""><div></div><div><br></div><blockquote type="cite"><div><div dir="ltr">I think it would be good to keep the usage to read binary data at least. </div></div></blockquote><div><br></div></span><div>Agreed -- it's only the text file reading I'm proposing to deprecate. It was kind of weird to cram it in there in the first place.</div><div><br></div><div>Oh, fromfile() has the same issues.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Chris</div></font></span><div><div class="h5"><div><br></div><br><blockquote type="cite"><div><div dir="ltr">Or is there a good alternative to `np.fromstring(<bytes>, dtype=...)`?  -- Marten<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 22, 2015 at 1:03 PM, Chris Barker <span dir="ltr"><<a href="mailto:chris.barker@noaa.gov" target="_blank">chris.barker@noaa.gov</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>There was just a question about a bug/issue with scipy.fromstring (which is numpy.fromstring) when used to read integers from a text file.</div><div><br></div><div><a href="https://mail.scipy.org/pipermail/scipy-user/2015-October/036746.html" target="_blank">https://mail.scipy.org/pipermail/scipy-user/2015-October/036746.html</a><br></div><div><br></div><div>fromstring() is bugging and inflexible for reading text files -- and it is a very, very ugly mess of code. I dug into it a while back, and gave up -- just to much of a mess!</div><div><br></div><div>So we really should completely re-implement it, or deprecate it. I doubt anyone is going to do a big refactor, so that means deprecating it.</div><div><br></div><div>Also -- if we do want a fast read numbers from text files function (which would be nice, actually), it really should get a new name anyway.</div><div><br></div><div>(and the hopefully coming new dtype system would make it easier to write cleanly)</div><div><br></div><div>I'm not sure what deprecating something means, though -- have it raise a deprecation warning in the next version?</div><div><br></div></div></blockquote></div></div></div></blockquote></div></div></div></blockquote><div><br></div><div>There was discussion at SciPy 2015 of separating out the text reading abilities of Pandas so that numpy could include it. We should contact Jeff Rebeck and see about moving that forward.<br><br></div><div dir="ltr">Chuck<span><font color="#888888"> <br></font></span></div></div></div></div>