[Scipy-tickets] [SciPy] #316: adding sparse matrices sometimes gives wrong result

SciPy scipy-tickets at scipy.net
Tue Dec 5 14:35:28 CST 2006


#316: adding sparse matrices sometimes gives wrong result
---------------------------------+------------------------------------------
 Reporter:  martin_wiechert      |        Owner:  somebody
     Type:  defect               |       Status:  new     
 Priority:  normal               |    Milestone:          
Component:  scipy.sparse         |      Version:  devel   
 Severity:  critical             |   Resolution:          
 Keywords:  sparse, wrong value  |  
---------------------------------+------------------------------------------
Comment (by edschofield):

 Yes, Robert, good point. cscadd and most of the other Fortran functions
 require sorted row/column indices. If we sort the indices manually after
 {{{
 >>> a[3, 0] = -1
 }}}
 by swapping the first two elements of a.data and a.rowind, the addition
 works correctly.

 So the problem is that the cscsetel function isn't sorting the rows
 correctly...

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


More information about the Scipy-tickets mailing list