[Scipy-tickets] [SciPy] #1669: csgraph test failures

SciPy Trac scipy-tickets@scipy....
Wed Jun 6 14:11:04 CDT 2012


#1669: csgraph test failures
--------------------------+-------------------------------------------------
 Reporter:  rgommers      |       Owner:  jakevdp
     Type:  defect        |      Status:  new    
 Priority:  high          |   Milestone:  0.11.0 
Component:  scipy.sparse  |     Version:  devel  
 Keywords:                |  
--------------------------+-------------------------------------------------
 With Python 3.2, now that the tests actually run (after
 https://github.com/scipy/scipy/pull/243)
 {{{
 /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-
 packages/nose/core.py:239: ResourceWarning: unclosed file
 <_io.TextIOWrapper
 name='/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2
 /site-packages/nose/usage.txt' mode='r' encoding='UTF-8'>
   os.path.dirname(__file__), 'usage.txt'), 'r').read()
 Exception ValueError: "Buffer dtype mismatch, expected 'int' but got
 'long'" in 'scipy.sparse.csgraph._traversal._depth_first_undirected'
 ignored
 Exception ValueError: "Buffer dtype mismatch, expected 'int' but got
 'long'" in 'scipy.sparse.csgraph._traversal._depth_first_undirected'
 ignored
 Exception ValueError: "Buffer dtype mismatch, expected 'int' but got
 'long'" in 'scipy.sparse.csgraph._traversal._depth_first_undirected'
 ignored
 F.E...............................................................................E.Exception
 ValueError: "Buffer dtype mismatch, expected 'int' but got 'long'" in
 'scipy.sparse.csgraph._traversal._depth_first_directed' ignored
 E
 ======================================================================
 ERROR: test_conversions.test_csgraph_from_dense
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2
 /site-packages/nose/case.py", line 178, in runTest
     self.test(*self.arg)
   File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2
 /site-packages/scipy/sparse/csgraph/tests/test_conversions.py", line 14,
 in test_csgraph_from_dense
     G_csr = csgraph_from_dense(G, null_value=0)
   File "_tools.pyx", line 149, in
 scipy.sparse.csgraph._tools.csgraph_from_dense
 (scipy/sparse/csgraph/_tools.c:2590)
   File "_tools.pyx", line 112, in
 scipy.sparse.csgraph._tools.csgraph_masked_from_dense
 (scipy/sparse/csgraph/_tools.c:2323)
   File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2
 /site-packages/numpy/ma/core.py", line 2197, in masked_values
     condition = umath.less_equal(mabs(xnew - value), atol + rtol *
 mabs(value))
 RuntimeWarning: invalid value encountered in absolute

 ======================================================================
 ERROR: test_spanning_tree.test_minimum_spanning_tree
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2
 /site-packages/nose/case.py", line 178, in runTest
     self.test(*self.arg)
   File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2
 /site-packages/scipy/sparse/csgraph/tests/test_spanning_tree.py", line 16,
 in test_minimum_spanning_tree
     mintree = minimum_spanning_tree(csgraph)
   File "_min_spanning_tree.pyx", line 95, in
 scipy.sparse.csgraph._min_spanning_tree.minimum_spanning_tree
 (scipy/sparse/csgraph/_min_spanning_tree.c:1584)
   File "_min_spanning_tree.pyx", line 104, in
 scipy.sparse.csgraph._min_spanning_tree._min_spanning_tree
 (scipy/sparse/csgraph/_min_spanning_tree.c:1794)
 ValueError: Buffer dtype mismatch, expected 'ITYPE_t' but got 'long'

 ======================================================================
 ERROR: test_traversal.test_graph_depth_first
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2
 /site-packages/nose/case.py", line 178, in runTest
     self.test(*self.arg)
   File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2
 /site-packages/scipy/sparse/csgraph/tests/test_traversal.py", line 42, in
 test_graph_depth_first
     dfirst_test = depth_first_tree(csgraph, 0, directed)
   File "_traversal.pyx", line 223, in
 scipy.sparse.csgraph._traversal.depth_first_tree
 (scipy/sparse/csgraph/_traversal.c:2237)
   File "_tools.pyx", line 329, in
 scipy.sparse.csgraph._tools.reconstruct_path
 (scipy/sparse/csgraph/_tools.c:3785)
   File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2
 /site-packages/scipy/sparse/csr.py", line 259, in __getitem__
     check_bounds(row, self.shape[0])
   File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2
 /site-packages/scipy/sparse/csr.py", line 195, in check_bounds
     max_indx = indices.max()
   File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2
 /site-packages/numpy/core/_methods.py", line 10, in _amax
     out=out, skipna=skipna, keepdims=keepdims)
 ValueError: zero-size array to reduction operation maximum which has no
 identity

 ======================================================================
 FAIL: test_connected_components.test_weak_connections
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2
 /site-packages/nose/case.py", line 178, in runTest
     self.test(*self.arg)
   File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2
 /site-packages/scipy/sparse/csgraph/tests/test_connected_components.py",
 line 17, in test_weak_connections
     assert_(n_components == 2)
   File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2
 /site-packages/numpy/testing/utils.py", line 34, in assert_
     raise AssertionError(msg)
 AssertionError

 ----------------------------------------------------------------------

 Relevant type definition:
 {{{
 ITYPE = np.int32
 ctypedef np.int32_t ITYPE_t
 }}}
 Ran 85 tests in 0.495s

 FAILED (errors=3, failures=1)
 }}}

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


More information about the Scipy-tickets mailing list