[Scipy-svn] r6938 - trunk/scipy/signal

scipy-svn@scip... scipy-svn@scip...
Sun Nov 21 18:39:26 CST 2010


Author: warren.weckesser
Date: 2010-11-21 18:39:25 -0600 (Sun, 21 Nov 2010)
New Revision: 6938

Modified:
   trunk/scipy/signal/wavelets.py
Log:
signal: Don't use a plain assert for argument validation.

Modified: trunk/scipy/signal/wavelets.py
===================================================================
--- trunk/scipy/signal/wavelets.py	2010-11-21 09:57:22 UTC (rev 6937)
+++ trunk/scipy/signal/wavelets.py	2010-11-22 00:39:25 UTC (rev 6938)
@@ -19,7 +19,8 @@
 
     """
     sqrt = np.sqrt
-    assert(p>=1)
+    if p < 1:
+        raise ValueError("p must be at least 1.")
     if p==1:
         c = 1/sqrt(2)
         return np.array([c,c])



More information about the Scipy-svn mailing list