<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 2, 2014 at 2:18 PM, Alexander Belopolsky <span dir="ltr"><<a href="mailto:ndarray@mac.com" target="_blank">ndarray@mac.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 class=""><br><div class="gmail_quote">On Sun, Nov 2, 2014 at 1:56 PM, Warren Weckesser <span dir="ltr"><<a href="mailto:warren.weckesser@gmail.com" target="_blank">warren.weckesser@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Or you could just call genfromtxt() once with `max_rows=1` to skip a row.  (I'm assuming that the first argument to genfromtxt is the open file object--or some other iterator--and not the filename.)</blockquote></div><br></span>That's hackish.  If I have to resort to something like this, I would just call next() on the open file object or iterator.</div></div></blockquote><div><br><br></div><div>I agree, calling genfromtxt to skip a line is silly.  Calling next() makes much more sense.<br><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"><br></div><div class="gmail_extra">Still, the case of dtype=None, name=None is problematic.   Suppose I want genfromtxt()  to detect the column names from the 1-st row and data types from the 3-rd.  How would you do that?</div></div>
<br></blockquote><div><br><br></div><div>This may sound like a cop out, but at some point, I stop trying to make genfromtxt() handle every possible case, and instead I would write a custom header reader to handle this.<br><br></div><div>Warren<br><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<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></div>