[Scipy-svn] r6780 - in trunk/scipy/sparse/linalg/isolve: . tests

scipy-svn@scip... scipy-svn@scip...
Sat Sep 11 22:14:32 CDT 2010


Author: warren.weckesser
Date: 2010-09-11 22:14:32 -0500 (Sat, 11 Sep 2010)
New Revision: 6780

Added:
   trunk/scipy/sparse/linalg/isolve/tests/test_utils.py
Modified:
   trunk/scipy/sparse/linalg/isolve/utils.py
Log:
BUG: sparse.linalg.isolve.utils: should be , not  (fixes #1257).

Added: trunk/scipy/sparse/linalg/isolve/tests/test_utils.py
===================================================================
--- trunk/scipy/sparse/linalg/isolve/tests/test_utils.py	                        (rev 0)
+++ trunk/scipy/sparse/linalg/isolve/tests/test_utils.py	2010-09-12 03:14:32 UTC (rev 6780)
@@ -0,0 +1,9 @@
+
+import numpy as np
+from numpy.testing import assert_raises
+
+from scipy.sparse.linalg import utils
+
+
+def test_make_system_bad_shape():
+    assert_raises(ValueError, utils.make_system, np.zeros((5,3)), None, np.zeros(4), np.zeros(4))

Modified: trunk/scipy/sparse/linalg/isolve/utils.py
===================================================================
--- trunk/scipy/sparse/linalg/isolve/utils.py	2010-09-12 01:05:37 UTC (rev 6779)
+++ trunk/scipy/sparse/linalg/isolve/utils.py	2010-09-12 03:14:32 UTC (rev 6780)
@@ -62,7 +62,7 @@
     A = aslinearoperator(A)
 
     if A.shape[0] != A.shape[1]:
-        raise ValueError('expected square matrix (shape=%s)' % shape)
+        raise ValueError('expected square matrix, but got shape=%s' % (A.shape,))
 
     N = A.shape[0]
 



More information about the Scipy-svn mailing list