[SciPy-dev] More trouble with complex sparse matrices
Nils Wagner
nwagner at iam.uni-stuttgart.de
Mon Oct 9 04:18:40 EDT 2006
Hi all,
The attached script yields
(0, 0) (1+1j)
(0, 1) (0.974820093029+0.566704683795j)
(1, 0) (0.623780655719+0.906657280726j)
(1, 1) (0.770817980571+0.526185760506j)
Traceback (most recent call last):
File "cs.py", line 7, in ?
A = A.todense()
File "/usr/lib64/python2.4/site-packages/scipy/sparse/sparse.py", line
358, in todense
return asmatrix(self.toarray())
File "/usr/lib64/python2.4/site-packages/scipy/sparse/sparse.py", line
2647, in toarray
d[i, j] = self.data[i][pos]
TypeError: can't convert complex to float; use abs(z)
Nils
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cs.py
Type: text/x-python
Size: 179 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20061009/394671af/attachment.py>
More information about the SciPy-Dev
mailing list