[Numpy-discussion] bug in scipy.io.mmio
Nils Wagner
nwagner at iam.uni-stuttgart.de
Wed May 2 08:21:38 EDT 2007
koara wrote:
> Hello, when saving a sparse matrix via scipy 0.5.2:
> scipy.io.mmio.mmwrite(), an exception is thrown:
>
> scipy.io.mmio.py: line 269: AttributeError: gettypecode not found
>
> changing the line to read
>
> 269: typecode = a.dtype.char
>
> fixes the problem.
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
Fixed in svn.
>>> from scipy import *
>>> A = sparse.speye(10,10)
>>> A
<10x10 sparse matrix of type '<type 'numpy.float64'>'
with 10 stored elements (space for 10)
in Compressed Sparse Column format>
>>> help (io.mmwrite)
>>> io.mmwrite('A1',A)
Nils
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: A1.mtx
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20070502/6746f009/attachment.ksh>
More information about the NumPy-Discussion
mailing list