[Numpy-discussion] Proposed change in genfromtxt(..., comments='#', names=True) behaviour

Pierre GM pgmdevlist@gmail....
Tue Jul 17 10:56:17 CDT 2012


On Tuesday, July 17, 2012 at 17:47 , Nathaniel Smith wrote:

I guess I still have a small preference for skip_header="comments"

over skip_header=True, since the latter is more opaque for no purpose.

Also it makes me slightly antsy since skip_header is normally an

integer, and True is, in fact, just an integer with a special

__repr__:


Nathaniel, that's basically my problem with `skip_header=True`. I still
prefer my -1 to your "comments", but whatever, personal taste again.



I'm not convinced by line 1353: unless you change it to

asbyte(comment).join(first_line.split(comments)[1:])

you gonna lose the '#', aren't you ? With the 'index' way, we just pick the

first one, as intended. But it's late and multitasking isn't really working

for me now.

I think you guys are looking for .split(comments, 1).

-n


Tadah! Thanks a lot!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120717/131106d4/attachment.html 


More information about the NumPy-Discussion mailing list