[Numpy-discussion] np.loadtxt : yet a new implementation...

Christopher Barker Chris.Barker@noaa....
Wed Dec 3 11:48:16 CST 2008

Pierre GM wrote:
> I can try, but in that case, please write me a unittest, so that I  
> have a clear and unambiguous idea of what you expect.

fair enough, though I'm not sure when I'll have time to do it.

I do wonder if anyone else thinks it would be useful to have multiple 
delimiters as an option. I got the idea because with fromfile(), if you 
specify, say ',' as the delimiter, it won't use '\n', only  a comma, so 
there is no way to quickly read a whole bunch of comma delimited data like:


so I'd like to be able to say to use either ',' or '\n' as the delimiter.

However, if I understand loadtxt() correctly, it's handling the new 
lines separately anyway (to get a 2-d array), so this use case isn't an 
issue. So how likely is it that someone would have:

1  2  3, 4, 5
6  7  8, 8, 9

and want to read that into a single 2-d array?

I'm not sure I've seen it.


Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception


More information about the Numpy-discussion mailing list