[SciPy-user] Problems with io.read_array
Pearu Peterson
pearu at cens.ioc.ee
Wed Apr 2 14:17:46 EST 2003
On Wed, 2 Apr 2003, Nils Wagner wrote:
> I tried to read an array from a file using io.read_array
>
> However, it failed.
>
> Traceback (most recent call last):
> File "io.py", line 5, in ?
> A = io.read_array(file,separator=' ',columns=None,
> lines=None,atype='d',linesep='\n')
> File
> "/usr/local/lib/python2.1/site-packages/scipy/io/array_import.py", line
> 369, in read_array
> outarr[k][row] = vals[k]
> ValueError: matrices are not aligned for copy
>
> Any idea ?
It turns out that you should not specify `separator`. When using
separator=None (that is also the default value), an array is read without
any problems.
I guess this is the case where lots of available options confuse
users to use features when they shouldn't ;)
Pearu
More information about the SciPy-User
mailing list