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
> [email protected]
> 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
%%MatrixMarket matrix coordinate real general
%
10 10 10
0 0 1.0000000000000000e+00
1 1 1.0000000000000000e+00
2 2 1.0000000000000000e+00
3 3 1.0000000000000000e+00
4 4 1.0000000000000000e+00
5 5 1.0000000000000000e+00
6 6 1.0000000000000000e+00
7 7 1.0000000000000000e+00
8 8 1.0000000000000000e+00
9 9 1.0000000000000000e+00
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion