[Scipy-tickets] [SciPy] #1876: bug in csgraph.connected_components with connection='strong'

SciPy Trac scipy-tickets@scipy....
Tue Mar 26 10:56:24 CDT 2013


#1876: bug in csgraph.connected_components with connection='strong'
----------------------------------+-----------------------------------------
 Reporter:  juh                   |       Owner:  jakevdp    
     Type:  defect                |      Status:  new        
 Priority:  normal                |   Milestone:  Unscheduled
Component:  scipy.sparse.csgraph  |     Version:  0.11.0     
 Keywords:  connected_components  |  
----------------------------------+-----------------------------------------

Comment(by jakevdp):

 Whoops, screwed up the formatting:

 {{{
 In [1]: import numpy as np
 In [2]: from scipy.sparse import csgraph
 In [3]: g = np.array([[0,1,1,0],[1,0,0,1],[0,0,0,1],[0,0,1,0]])
 In [4]: csgraph.connected_components(g, connection='strong')
 Out[4]: (2, array([1, 1, 0, 0], dtype=int32))
 }}}

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


More information about the Scipy-tickets mailing list