[Scipy-tickets] [SciPy] #1701: csgraph.shortest_path failures

SciPy Trac scipy-tickets@scipy....
Sun Jul 15 09:50:50 CDT 2012

#1701: csgraph.shortest_path failures
 Reporter:  rgommers              |       Owner:  jakevdp
     Type:  defect                |      Status:  new    
 Priority:  normal                |   Milestone:  0.11.0 
Component:  scipy.sparse.csgraph  |     Version:  0.10.0 
 Keywords:  shortest_path         |  

Comment(by rgommers):

 OK, found the issue. Line 883 of {{{_shortest_path.pyx}}} is:
 dist_array = np.empty(N, dtype=DTYPE)
 Then it is used uninitialized in {{{_johnson_directed}}} and
 {{{_johnson_undirected}}}. Replacing {{{empty}}} with {{{zeros}}} makes
 all tests pass. Not sure if zeros is the right initialization though,
 since the values in {{{dist_array}}} are used.

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