[SciPy-user] Problems with io.read_array
Travis E. Oliphant
oliphant.travis at ieee.org
Wed Apr 2 17:47:23 EST 2003
>
>
>>I am not sure whether it is io.read_array(..) bug or a bug of this data
>>file. I would assume that io.read_array(..) should be able to read
>>such a data file even with the contradiction above. On the other hand, if
>>this is against io.read_array data formatting specification (Travis O., do
>>we have one except the io.read_array source?) then you should fix the data
>>file (e.g. by replacing double spaces with single space).
>>
>Personally I would object this latter behaviour, i.e.,
>I think that any number of spaces (>=1) should separate fields
>in this example. This allows for nicely formatted positive/negative
>or decimally aligned data.
>Also one does not have to worry about one space too much
>in print/write statements etc.
>
Your objections make far less impact than working code that corrects the
problem would.
>As example for other programs which don't bother about spaces:
> - gnuplot
> - TableIO module
> (which I find better than scipy.io in some respects)
>
>
I would not mind using TableIO for scipy, but I've never seen someone
offer to do that. TableIO seems happy to exist as a separate project.
The new CSV module that people are writing for Python should help these
parsing issues.
This mis-treatment of the whitespace separator seems like a bug, but I
don't have time to look into it right now.
>Off-topic: would not reading/writing arrays be something which should be in Numeric ?
>
Perhaps, but then which model for reading and writing are you going to
accept? The early Numeric contributors never decided to support this
generally.
-Travis O.
More information about the SciPy-User
mailing list