[Scipy-tickets] [SciPy] #1681: csgraph.laplacian gives incorrect results

SciPy Trac scipy-tickets@scipy....
Fri Jun 22 17:31:01 CDT 2012


#1681: csgraph.laplacian gives incorrect results
--------------------------+-------------------------------------------------
 Reporter:  pv            |       Owner:  somebody
     Type:  defect        |      Status:  new     
 Priority:  highest       |   Milestone:  0.11.0  
Component:  scipy.sparse  |     Version:  0.10.0  
 Keywords:                |  
--------------------------+-------------------------------------------------

Comment(by pv):

 It's a `lil_matrix` assignment bug:
 {{{
 >>> from scipy import sparse
 >>> x = sparse.lil_matrix((6, 6))
 >>> x[[0,1,2],[0,1,2]] = [5,6,7]
 >>> x.todense()
 matrix([[ 5.,  6.,  7.,  0.,  0.,  0.],
         [ 5.,  6.,  7.,  0.,  0.,  0.],
         [ 5.,  6.,  7.,  0.,  0.,  0.],
         [ 0.,  0.,  0.,  0.,  0.,  0.],
         [ 0.,  0.,  0.,  0.,  0.,  0.],
         [ 0.,  0.,  0.,  0.,  0.,  0.]])
 }}}

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


More information about the Scipy-tickets mailing list