[Numpy-discussion] genfromtxt documentation : review needed

Pierre GM pgmdevlist@gmail....
Fri Oct 16 16:36:48 CDT 2009

On Oct 16, 2009, at 8:29 AM, Skipper Seabold wrote:

> Great work!  I am especially glad to see the better documentation on
> missing values, as I didn't fully understand how to do this.  A few
> small comments and a small attached diff with a few nitpicking
> grammatical changes and some of what's proposed below.

Thanks. I took your modifications into account.

> On the actual function, I am wondering if white space shouldn't be
> stripped by default, or at least if we have fixed width columns.

Well, I'd do the opposite: `autostrip=False` if we work with fixed- 
length delimiters, `autostrip=True` if we work with character  

>  I also can't think of a case where I'd ever care about
> leading or trailing white space.

having `autostrip=False` when dealing with spaces as delimiters is a  
feature that was explicitly requested a while ago, when I started  
working on the function.

> I always get confused going back and forth from zero-indexed to non
> zero-indexed, which might not be a good enough reason to worry about
> this, but it might be helpful to explicitly say that skip_header is
> not zero-indexed, though it doesn't raise an exception if you try.

Took your comment into account, but I did state that `skip_header`  
expects a number of lines, not a line index.

> Also, I don't know if this is even something that should be worried
> about in the io, but recarray names also can't start with a number to
> preserve attribute names look up, but I thought I would bring it up
> anyway, since I ran across this recently.

Good point. I'll patch NameValidator for that.

> I didn't know about being able to specify the dtype as a dict.  That
> might be handy.  Is there any way to cross-link to the dtype
> documentation in rst?  I can't remember.  That might be helpful to
> have.

Hence my call to the doc specialists.

> I never did figure out what the loose keyword did, but I guess it's
> not that important to me if I've never needed it.

Oh yes, this one. Well, a StringConverter can either returns the  
default if it can't convert the string (loose=True) or raise an  
exception if it can't convert the string and the string is not part of  
the missing_values list of this StringConverter (loose=False). I need  
to add a couple of examples here.

More information about the NumPy-Discussion mailing list