[SciPy-user] ValueError: need more than 1 value to unpack

Ed Schofield schofield at ftw.at
Thu Mar 16 16:02:24 CST 2006


On 16/03/2006, at 12:56 PM, Nils Wagner wrote:

> If I use a lowercase dtype name
> A_csc = s.csc_matrix((3,3),complex128)
> for i in arange(0,3):
>
>     A_csr[i,i] = 1.0+2j
>     A_csc[i,i] = 1.0+2j
>
>>>> A_csc
> <3x3 sparse matrix of type '<type 'float64scalar'>'
>         with 3 stored elements (space for 100)
>         in Compressed Sparse Column format>
>
> Note that the imaginary part is missing !
>
>>>> print A_csc
>   (0, 0)        1.0
>   (1, 1)        1.0
>   (2, 2)        1.0

Try again using:
 >>> A_csc = csc_matrix((3,3), dtype=complex128)

The dtype keyword is necessary explicitly.  I've closed the bug  
report for now.  Could you please submit your user name with future  
bug reports on Trac?  Thanks :)

-- Ed



More information about the SciPy-user mailing list