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

SciPy Trac scipy-tickets@scipy....
Sat Jun 23 17:11:29 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 seems not to be a regression. How it works is now the other sensible
 way how indexing with two lists could work, i.e. same as `x[ix_(a, b)]`.
 Though, this part of the code seems to have been written in 2007, well
 after fancy indexing was introduced in Numpy.

 So, backwards compatibility concerns again. Choices for 0.11.0 are either
 to hack around in csgraph.laplacian and postpone the break, or to make the
 break now.

 Ongoing work for fixing lil_matrix et al. for good is in
 https://github.com/pv/scipy-work/tree/bug/sparse-fixes --- not ready to
 merge yet, though the first two commits probably are cherry pickable. I
 don't have a fix that doesn't change lil_matrix, though.

 I think leaving the behavior of `lil_matrix` as it is will not be OK
 (showcase: csgraph.laplacian). The change will, as far as I see, make code
 that worked previously to fail loudly, rather than silently, so it's sort
 of OK.

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1681#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