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

Ed Schofield schofield at ftw.at
Thu Mar 16 06:40:29 EST 2006


Nils Wagner wrote:
> Is this a bug ?
>
>     A_csc = csc_matrix((3,3),Complex128)
>   File "/usr/lib64/python2.4/site-packages/scipy/sparse/sparse.py", line
> 521, in __init__
>     (M, N) = dims
> ValueError: need more than 1 value to unpack
>   

This works fine for me:

>>> from scipy import sparse as s
>>> import numpy
>>> A_csc = s.csc_matrix((3,3), numpy.complex128)

Try with a lowercase 'complex128'.  I think the uppercase dtype names
are deprecated, but also _different_ to the lowercase dtype names, so
Complex128 would be equivalent to complex256 -- that is, the real and
imaginary components are both 128-bit floats.  Complex128, with
uppercase 'C', is not even defined on my 32-bit machine...

But it looks like a bug anyway.  Robert C., do you have a 64-bit machine
to investigate this?

-- Ed




More information about the SciPy-User mailing list