[SciPy-dev] More bugs in sparse.py

Nils Wagner nwagner at mecha.uni-stuttgart.de
Tue Feb 14 07:29:06 CST 2006


Hi Robert,

I followed your advice and replaced dot by *
This results in

    R0 = C-(A*X0+X0*B)
  File "/usr/local/lib/python2.4/site-packages/scipy/sparse/sparse.py",
line 537, in __add__
    c, rowc, ptrc, ierr = func(data1, self.rowind[:nnz1], self.indptr,
data2, ocs.rowind[:nnz2], ocs.indptr)
ValueError: failed to create intent(cache|hide)|optional array-- must
have defined dimensions but got (0,)

>>> A
<317x317 sparse matrix of type '<type 'float64scalar'>'
        with 7280 stored elements (space for 7327)
        in Compressed Sparse Column format>
>>> X0
<317x10 sparse matrix of type '<type 'float64scalar'>'
        with 0 stored elements (space for 100)
        in Compressed Sparse Column format>
>>> C
<317x10 sparse matrix of type '<type 'float64scalar'>'
        with 3170 stored elements (space for 3828)
        in Compressed Sparse Column format>
>>> B
<10x10 sparse matrix of type '<type 'float64scalar'>'
        with 28 stored elements (space for 28)
        in Compressed Sparse Column format>

Nils





More information about the Scipy-dev mailing list