[Numpy-discussion] genfromtxt - the return

Pierre GM pgmdevlist@gmail....
Tue Oct 6 16:04:28 CDT 2009


On Oct 6, 2009, at 4:43 PM, Christopher Barker wrote:

> Pierre GM wrote:
>>> I think that the default invalid_raise should be True.
>>
>> Mmh, OK, that's a +1/) for invalid_raise=true. Anybody else ?
>
> yup -- make it +2 -- ignoring erreos and losing data by default is a
> "bad idea"!

OK then, that's enough for me: I'll put invalid_raise as True by  
default. Note that a warning was emitted no matter what.


>
>>> One 'feature' is that there is no way to indicate multiple  
>>> delimiters
>>> when the delimiter is whitespace.
>>> A B C D
>>> 1 2 3 4
>>> 1     4 5
>
> I'd say someone has made a very poor choice of file formats!
>
> Unless this s a fixed width file, in which case it should be processes
> as such, rather than as a delimited one. I suppose it wouldn't hurt to
> add that feature to genfromtxt.. or is it there already. Perhaps  
> that's
> what this means:
>
>> Have you tried using a sequence of integers for the delimiter ?

Yes, if you give a sequence of integers as delimiter, it is  
interpreted as the length of each field. At least, should be.


More information about the NumPy-Discussion mailing list