[SciPy-user] problems with scipy.io.readarray

Travis Oliphant oliphant at ee.byu.edu
Thu Jun 6 13:02:39 CDT 2002


>
> from scipy import io
> x=io.read_array('test.dat')
>
> but get the following traceback
>
> Traceback (most recent call last):
>   File "<interactive input>", line 1, in ?
>   File "C:\Python22\Lib\site-packages\scipy\io\array_import.py", line 319,
>   in read_array
>     colsize, collist = getcolumns(ascii_object, columns, sep)
>   File "C:\Python22\Lib\site-packages\scipy\io\array_import.py", line 247,
>   in getcolumns
>     val = process_line(firstline, separator, collist, [Numeric.Float]*N, 0)
>   File "C:\Python22\Lib\site-packages\scipy\io\array_import.py", line 227,
>   in process_line
>     vals[k] = extract_columns(arlist, collist[k], atype[k], missing)
>   File "C:\Python22\Lib\site-packages\scipy\io\array_import.py", line 205,
>   in extract_columns
>     return numpyio.convert_objectarray(toconvlist, atype, missing)
> SystemError: D:
> \trentm\main\Apps\ActivePython-2_2\src\Core\Objects\methodobject.c:33: bad
> argument to internal function
>

I don't know what's going on.  Could you send me the test.dat file?  This
function reads text files.  Is test.dat a text file?

If you could isolate the part of the file that gives the error in test.dat
that would be helpful.  It could be a problem with opening text files
versus binary files on Windows systems.

Good luck,

-Travis





More information about the SciPy-user mailing list