[Scipy-svn] r3686 - in trunk/scipy/sparse: . tests
scipy-svn at scipy.org
scipy-svn at scipy.org
Tue Dec 18 14:56:16 EST 2007
Author: wnbell
Date: 2007-12-18 13:56:14 -0600 (Tue, 18 Dec 2007)
New Revision: 3686
Modified:
trunk/scipy/sparse/compressed.py
trunk/scipy/sparse/tests/test_base.py
Log:
small edit
Modified: trunk/scipy/sparse/compressed.py
===================================================================
--- trunk/scipy/sparse/compressed.py 2007-12-18 19:54:33 UTC (rev 3685)
+++ trunk/scipy/sparse/compressed.py 2007-12-18 19:56:14 UTC (rev 3686)
@@ -370,7 +370,6 @@
y = empty( self.shape[0], dtype=upcast(self.dtype,other.dtype) )
else:
if output.shape != (M,) and output.shape != (M,1):
- print "self ",self.shape,"other",other.shape
raise ValueError, "output array has improper dimensions"
if not output.flags.c_contiguous:
raise ValueError, "output array must be contiguous"
Modified: trunk/scipy/sparse/tests/test_base.py
===================================================================
--- trunk/scipy/sparse/tests/test_base.py 2007-12-18 19:54:33 UTC (rev 3685)
+++ trunk/scipy/sparse/tests/test_base.py 2007-12-18 19:56:14 UTC (rev 3686)
@@ -452,6 +452,12 @@
self.assertRaises( ValueError, self.datsp.matvec, x, y )
+ # improper output shape
+ x = array([1.25, -6.5, 0.125, -3.75],dtype='d')
+ y = zeros(2,dtype='d')
+
+ self.assertRaises( ValueError, self.datsp.matvec, x, y )
+
# proper upcast output type
x = array([1.25, -6.5, 0.125, -3.75],dtype='complex64')
x.imag = [1,2,3,4]
More information about the Scipy-svn
mailing list