[Scipy-tickets] [SciPy] #826: Multiplication of sparse arrays completely wrong

SciPy scipy-tickets@scipy....
Sat Dec 27 17:09:42 CST 2008


#826: Multiplication of sparse arrays completely wrong
--------------------------+-------------------------------------------------
 Reporter:  chtito        |       Owner:  wnbell
     Type:  defect        |      Status:  new   
 Priority:  normal        |   Milestone:        
Component:  scipy.sparse  |     Version:        
 Severity:  critical      |    Keywords:        
--------------------------+-------------------------------------------------
 Here is an example
 {{{
 >>> s = scipy.sparse.spdiags(array([numpy.ones(3)]*2), [-2,0], 5,3)
 >>> i = scipy.sparse.eye(5,3,-1)
 >>> (s*i).toarray()
 array([[ 0.,  0.,  0.],
        [ 1.,  0.,  0.],
        [ 0.,  1.,  0.],
        [ 1.,  0.,  1.],
        [ 0.,  0.,  0.]])
 }}}
 But it should be zero of course, as `s.toarray() * i.toarray()` confirms.

 This is a *huge* bug.

-- 
Ticket URL: <http://scipy.org/scipy/scipy/ticket/826>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list