sfepy/sfepy — Issue #15: two tests fail in scipy0.6.0 (but work in svn)
Author: rc
Created: 2012-01-30 10:23:55+00:00
State: open

All tests should pass:

$ ./runTests.py --filter-more
<<< directory: tests, test files: 13
+++ test_structAdd: ok
+++ test_structIAdd: ok
+++ test_linear_terms: ok
+++ test_input: ok
+++ test_input: ok
+++ test_input: ok
+++ test_input: ok
+++ test_recursiveDictHDF5: ok
+++ test_sparseMatrixHDF5: ok
--- test_linearRigidBodyBC: failed!
--- test_linearRigidBodyBC: failed!
+++ test_parseEquations: ok
+++ test_parseRegions: ok
+++ test_pbc: ok
+++ test_pbc: ok
+++ test_problemCreation: ok
13 test file(s) executed in 24.51 s, 2 failure(s) of 16 test(s)

The two failing tests are due to the fact, that in the latest released
scipy (0.6.0) you cannot use generalized indices:

File "/usr/lib/python2.4/site-packages/scipy/sparse/sparse.py", line
2450, in __setitem__
raise ValueError, "invalid index value: %s" % str((i, j))
ValueError: invalid index value: (array([ 16, 17, 18, ..., 7095, 7096,
7097]), array([ 0, 1, 2, ..., 5689, 5690, 5691]))

which is fixed in the svn version of scipy.

Is it possible to add a fix to support both scipy0.6.0 and svn? I think we
should not depend on svn versions of other libraries when possible, so that
we can just come to a different system, install standard packages (using
apt-get in Debian, something else in gentoo) and then sfepy should work.

If it is too much pain to support scipy0.6.0, then of course it's not worthy.

Migrated from http://code.google.com/p/sfepy/issues/detail?id=11

earlier comments

robert.cimrman said, at 2008-02-05T13:38:00.000Z:

This functionality depends on the ability to extract a submatrix from a scipy CSR
matrix. It cannot work without this ability reasonably -> in this case I am for
waiting for a next scipy release. Anyway, linearRigidBodyBC is a special thing that
majority of people do not need.

ondrej.certik said, at 2008-02-05T13:46:41.000Z:

ok, in this case I suggest to check the version of scipy in the tests and do not
execute them for scipy 0.6.0.

Patch implementing this attached.

robert.cimrman said, at 2008-02-05T13:56:10.000Z:

fine solution, thanks!

ondrej.certik said, at 2008-02-05T13:58:44.000Z:

Works fine for me now. I forgot to write a meaningful log into the patch. Next time. :)