[SciPy-user] Problems with io.read_array
Travis E. Oliphant
oliphant.travis at ieee.org
Wed Apr 2 19:17:19 EST 2003
Pearu Peterson wrote:
>On
>
>Though I think your data file looks reasonably formatted that
>io.read_array(..) should be able to read it, it turns out that
>this data file does not satisfy the assumptions made in the algorithm
>of io.read_array(..) function:
>1) `separator` should be ' ' (two spaces)
>2) negative entries in data file are separated by ' ' (one space),
> which contradicts with the previous point.
>
You are right, that Nils had a contradiction between what he called the
separator and what in his mind actually was the separator.
He wanted a "white-space" separator which happens to be the default as
you've discovered by now.
>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).
>
>
The "formatting" specification is in the docstring. I should add
something about the default separator being "white-space".
-Travis O.
More information about the SciPy-User
mailing list