[SciPy-user] ValueError: need more than 1 value to unpack
Nils Wagner
nwagner at mecha.uni-stuttgart.de
Fri Mar 17 04:12:03 EST 2006
Ed Schofield wrote:
> 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
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
>
BTW, dtype=complex256 aka dtype=Complex128 doesn't work in this context.
Who can confirm this behaviour on a 64bit system ?
A_csc = s.csc_matrix((3,3),dtype=complex256)
for i in arange(0,3):
A_csc[i,i] = 1.0+2j
print A_csc
Nils
More information about the SciPy-User
mailing list