[SciPy-user] More problems with Sparse

Nils Wagner nwagner at mecha.uni-stuttgart.de
Wed Oct 27 02:54:42 EDT 2004


Hi Travis,

A few days ago I have reported on the following bug in sparse. (recent 
Bug tracker entries)
It would be nice if this problem could be fixed.
Thanks in advance.

Nils

>>> from scipy import *
>>> A = sparse.dok_matrix()
>>> A[0,0] = 1j
>>> A.todense()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 1326, in todense
    new[ikey0,ikey1] = self[key]
TypeError: can't convert complex to float; use abs(z)






More information about the SciPy-User mailing list