<div dir="ltr">I agree that "<span style="font-family:arial,sans-serif;font-size:13px">last comment line before the first line of data" is more descriptive. </span><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">Regarding the location of the names. I thought taking it from the last comment line before the first line of data made sense because it would permit reading of just the data with np.loadtxt(), but also permit creating records with np.recfromtxt(). It would also be good to consider other implementations. For example, pandas and R both use names without a comment character.</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">Albert</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, May 31, 2013 at 2:14 PM, Benjamin Root <span dir="ltr"><<a href="mailto:ben.root@ou.edu" target="_blank">ben.root@ou.edu</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"><br><div class="gmail_quote"><div class="im">On Fri, May 31, 2013 at 5:08 PM, Albert Kottke <span dir="ltr"><<a href="mailto:albert.kottke@gmail.com" target="_blank">albert.kottke@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">I noticed that genfromtxt() did not skip comments if the keyword names is not True. If names is True, then genfromtxt() would take the first line as the names. I am proposing a fix to genfromtxt that skips all of the comments in a file, and potentially using the last comment line for names. This will allow reading files with and without comments and/or names.<div>



<br></div><div>The difference is here: <a href="https://github.com/arkottke/numpy/compare/my-genfromtxt" target="_blank">https://github.com/arkottke/numpy/compare/my-genfromtxt</a></div><span><font color="#888888"><div>

<br></div></font></span></div></blockquote><div><br></div></div><div>Careful with semantics here.  First off, using the last comment line as the source for names might initially make sense, except when there are comments within the data file.  I would suggest going for "last comment line before the first line of data".  Second, sometimes the names come from an un-commented first line, but comments are still used within the file elsewhere.<br>


<br></div><div>Just some food for thought.  I don't know if the current design is best or not.<br><br>Ben Root<br></div></div></div></div>
<br>_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
<br></blockquote></div><br></div>