[Scipy-svn] r5501 - trunk/scipy/fftpack

scipy-svn@scip... scipy-svn@scip...
Mon Jan 19 02:37:24 CST 2009


Author: cdavid
Date: 2009-01-19 02:37:20 -0600 (Mon, 19 Jan 2009)
New Revision: 5501

Modified:
   trunk/scipy/fftpack/realtransforms.py
Log:
Raise an exception for DCT-I and size < 2.

Modified: trunk/scipy/fftpack/realtransforms.py
===================================================================
--- trunk/scipy/fftpack/realtransforms.py	2009-01-19 08:33:22 UTC (rev 5500)
+++ trunk/scipy/fftpack/realtransforms.py	2009-01-19 08:37:20 UTC (rev 5501)
@@ -199,6 +199,9 @@
     else:
         nm = 0
 
+    if type == 1 and n < 2:
+        raise ValueError("DCT-I is not defined for size < 2")
+
     if axis == -1 or axis == len(tmp.shape) - 1:
         return f(tmp, n, nm, overwrite_x)
     #else:



More information about the Scipy-svn mailing list