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

SciPy Trac scipy-tickets@scipy....
Sat Jul 14 10:14:57 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):

 Here are the failures I see (about 1 in 5 to 1 in 10 runs):
 {{{
 =====================================================================
 FAIL: test_shortest_path.test_shortest_path_indices(<built-in function
 johnson>, (4,))
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/nose-1.1.2-py2.6.egg/nose/case.py", line 197, in runTest
     self.test(*self.arg)
   File
 "/Users/rgommers/Code/scipy/scipy/sparse/csgraph/tests/test_shortest_path.py",
 line 74, in check
     assert_array_almost_equal(SP,
 undirected_SP[indices].reshape(outshape))
   File "/Users/rgommers/Code/numpy/numpy/testing/utils.py", line 811, in
 assert_array_almost_equal
     header=('Arrays are not almost equal to %d decimals' % decimal))
   File "/Users/rgommers/Code/numpy/numpy/testing/utils.py", line 644, in
 assert_array_compare
     raise AssertionError(msg)
 AssertionError:
 Arrays are not almost equal to 6 decimals

 (mismatch 20.0%)
  x: array([[ 0.,  3.,  3.,  1.,  2.],
        [ 3.,  0.,  6.,  2.,  4.],
        [ 0.,  3.,  0.,  1.,  2.],
        [ 1.,  2.,  4.,  0.,  2.]])
  y: array([[ 0.,  3.,  3.,  1.,  2.],
        [ 3.,  0.,  6.,  2.,  4.],
        [ 3.,  6.,  0.,  4.,  5.],
        [ 1.,  2.,  4.,  0.,  2.]])

 =====================================================================
 FAIL: test_shortest_path.test_shortest_path_indices(<built-in function
 johnson>, (4, 1))
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/nose-1.1.2-py2.6.egg/nose/case.py", line 197, in runTest
     self.test(*self.arg)
   File
 "/Users/rgommers/Code/scipy/scipy/sparse/csgraph/tests/test_shortest_path.py",
 line 82, in check
     assert_array_almost_equal(SP,
 undirected_SP[indices].reshape(outshape))
   File "/Users/rgommers/Code/numpy/numpy/testing/utils.py", line 811, in
 assert_array_almost_equal
     header=('Arrays are not almost equal to %d decimals' % decimal))
   File "/Users/rgommers/Code/numpy/numpy/testing/utils.py", line 644, in
 assert_array_compare
     raise AssertionError(msg)
 AssertionError:
 Arrays are not almost equal to 6 decimals

 (mismatch 50.0%)
  x: array([[[ 0.,  3.,  3.,  2.,  4.]],

        [[ 0.,  0.,  3.,  2.,  4.]],...
  y: array([[[ 0.,  3.,  3.,  1.,  2.]],

        [[ 3.,  0.,  6.,  2.,  4.]],...

 =====================================================================
 FAIL: test_shortest_path.test_shortest_path_indices(<built-in function
 johnson>, (4, 1))
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/nose-1.1.2-py2.6.egg/nose/case.py", line 197, in runTest
     self.test(*self.arg)
   File
 "/Users/rgommers/Code/scipy/scipy/sparse/csgraph/tests/test_shortest_path.py",
 line 82, in check
     assert_array_almost_equal(SP,
 undirected_SP[indices].reshape(outshape))
   File "/Users/rgommers/Code/numpy/numpy/testing/utils.py", line 811, in
 assert_array_almost_equal
     header=('Arrays are not almost equal to %d decimals' % decimal))
   File "/Users/rgommers/Code/numpy/numpy/testing/utils.py", line 644, in
 assert_array_compare
     raise AssertionError(msg)
 AssertionError:
 Arrays are not almost equal to 6 decimals

 (mismatch 40.0%)
  x: array([[[ 0.,  3.,  3.,  2.,  2.]],

        [[ 3.,  0.,  6.,  2.,  3.]],...
  y: array([[[ 0.,  3.,  3.,  1.,  2.]],

        [[ 3.,  0.,  6.,  2.,  4.]],...

 =====================================================================
 FAIL: test_shortest_path.test_shortest_path_indices(<built-in function
 johnson>, (4, 1))
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/nose-1.1.2-py2.6.egg/nose/case.py", line 197, in runTest
     self.test(*self.arg)
   File
 "/Users/rgommers/Code/scipy/scipy/sparse/csgraph/tests/test_shortest_path.py",
 line 82, in check
     assert_array_almost_equal(SP,
 undirected_SP[indices].reshape(outshape))
   File "/Users/rgommers/Code/numpy/numpy/testing/utils.py", line 811, in
 assert_array_almost_equal
     header=('Arrays are not almost equal to %d decimals' % decimal))
   File "/Users/rgommers/Code/numpy/numpy/testing/utils.py", line 644, in
 assert_array_compare
     raise AssertionError(msg)
 AssertionError:
 Arrays are not almost equal to 6 decimals

 (mismatch 30.0%)
  x: array([[[ 0.,  3.,  3.,  2.,  4.]],

        [[ 3.,  0.,  6.,  2.,  4.]],...
  y: array([[[ 0.,  3.,  3.,  1.,  2.]],

        [[ 3.,  0.,  6.,  2.,  4.]],...

 =====================================================================
 FAIL: test_shortest_path.test_predecessors('J', False)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/nose-1.1.2-py2.6.egg/nose/case.py", line 197, in runTest
     self.test(*self.arg)
   File
 "/Users/rgommers/Code/scipy/scipy/sparse/csgraph/tests/test_shortest_path.py",
 line 102, in check
     assert_array_almost_equal(SP, SP_res[directed])
   File "/Users/rgommers/Code/numpy/numpy/testing/utils.py", line 811, in
 assert_array_almost_equal
     header=('Arrays are not almost equal to %d decimals' % decimal))
   File "/Users/rgommers/Code/numpy/numpy/testing/utils.py", line 644, in
 assert_array_compare
     raise AssertionError(msg)
 AssertionError:
 Arrays are not almost equal to 6 decimals

 (mismatch 16.0%)
  x: array([[ 0.,  3.,  3.,  1.,  2.],
        [ 3.,  0.,  6.,  2.,  4.],
        [ 0.,  3.,  0.,  1.,  2.],...
  y: array([[ 0.,  3.,  3.,  1.,  2.],
        [ 3.,  0.,  6.,  2.,  4.],
        [ 3.,  6.,  0.,  4.,  5.],...

 =====================================================================
 ERROR: test_shortest_path.test_shortest_path_indices(<built-in function
 johnson>, (2, 2))
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/nose-1.1.2-py2.6.egg/nose/case.py", line 197, in runTest
     self.test(*self.arg)
   File
 "/Users/rgommers/Code/scipy/scipy/sparse/csgraph/tests/test_shortest_path.py",
 line 83, in check
     indices=indices.reshape(indshape))
   File "_shortest_path.pyx", line 921, in
 scipy.sparse.csgraph._shortest_path.johnson
 (build/scons/scipy/sparse/csgraph/_shortest_path.c:9099)
 RuntimeWarning: invalid value encountered in add

 =====================================================================
 FAIL: test_shortest_path.test_shortest_path_indices(<built-in function
 johnson>, (4,))
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/nose-1.1.2-py2.6.egg/nose/case.py", line 197, in runTest
     self.test(*self.arg)
   File
 "/Users/rgommers/Code/scipy/scipy/sparse/csgraph/tests/test_shortest_path.py",
 line 84, in check
     assert_array_almost_equal(SP,
 undirected_SP[indices].reshape(outshape))
   File "/Users/rgommers/Code/numpy/numpy/testing/utils.py", line 811, in
 assert_array_almost_equal
     header=('Arrays are not almost equal to %d decimals' % decimal))
   File "/Users/rgommers/Code/numpy/numpy/testing/utils.py", line 644, in
 assert_array_compare
     raise AssertionError(msg)
 AssertionError:
 Arrays are not almost equal to 6 decimals

 (mismatch 30.0%)
  x: array([[ 0.,  3.,  3.,  2.,  4.],
        [ 3.,  0.,  6.,  2.,  4.],
        [ 3.,  6.,  0.,  5.,  7.],
        [ 1.,  1.,  4.,  0.,  3.]])
  y: array([[ 0.,  3.,  3.,  1.,  2.],
        [ 3.,  0.,  6.,  2.,  4.],
        [ 3.,  6.,  0.,  4.,  5.],
        [ 1.,  2.,  4.,  0.,  2.]])

 =====================================================================
 ERROR: test_shortest_path.test_shortest_path_indices(<built-in function
 johnson>, (4,))
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/nose-1.1.2-py2.6.egg/nose/case.py", line 197, in runTest
     self.test(*self.arg)
   File
 "/Users/rgommers/Code/scipy/scipy/sparse/csgraph/tests/test_shortest_path.py",
 line 83, in check
     indices=indices.reshape(indshape))
   File "_shortest_path.pyx", line 921, in
 scipy.sparse.csgraph._shortest_path.johnson
 (build/scons/scipy/sparse/csgraph/_shortest_path.c:9099)
 RuntimeWarning: invalid value encountered in add

 =====================================================================
 ERROR: test_shortest_path.test_shortest_path_indices(<built-in function
 johnson>, (4,))
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/nose-1.1.2-py2.6.egg/nose/case.py", line 197, in runTest
     self.test(*self.arg)
   File
 "/Users/rgommers/Code/scipy/scipy/sparse/csgraph/tests/test_shortest_path.py",
 line 83, in check
     indices=indices.reshape(indshape))
   File "_shortest_path.pyx", line 921, in
 scipy.sparse.csgraph._shortest_path.johnson
 (build/scons/scipy/sparse/csgraph/_shortest_path.c:9099)
 RuntimeWarning: invalid value encountered in add
 }}}

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


More information about the Scipy-tickets mailing list