
osman wrote:
All tests should pass. Could you try
./runTests.py tests/test_lcbc_2d.py --debug
stargate:/home/osman/sfepy-release-00.50.00-bash-> ./runTests.py tests/test_lcbc_2d.py --debug 329, in setup_lcbc_operators mtx_lc[indx,icols] = op_lc File "/usr/lib/python2.5/site-packages/scipy/sparse/lil.py", line 297, in __setitem__ if isspmatrix(x) and index == (slice(None), slice(None)): ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() stargate:/home/osman/sfepy-release-00.50.00-bash->
I see. It is a bug caused by a very recent change to LIL matrix. The patch below should fix it - I have sent it to Nathan Bell (current maintainer of scipy.sparse) for review, until then you can just use the last released version of scipy, or apply the patch yourself. r. --- scipy/sparse/lil.py (revision 4688) +++ scipy/sparse/lil.py (working copy) @@ -294,18 +294,20 @@ elif not isinstance(x, spmatrix): x = lil_matrix(x) - if isspmatrix(x) and index == (slice(None), slice(None)): - # self[:,:] = other_sparse - x = lil_matrix(x) - self.rows = x.rows - self.data = x.data - return - try: i, j = index except (ValueError, TypeError): raise IndexError, "invalid index" + if isspmatrix(x): + if (isinstance(i, slice) and (i == slice(None))) and \ + (isinstance(j, slice) and (j == slice(None))): + # self[:,:] = other_sparse + x = lil_matrix(x) + self.rows = x.rows + self.data = x.data + return + if isscalar(i): row = self.rows[i] data = self.data[i]