[Numpy-svn] r3452 - trunk/numpy/fft

numpy-svn at scipy.org numpy-svn at scipy.org
Mon Nov 20 01:01:50 CST 2006


Author: stefan
Date: 2006-11-20 01:01:35 -0600 (Mon, 20 Nov 2006)
New Revision: 3452

Modified:
   trunk/numpy/fft/fftpack.py
Log:
Refuse to compute FFT for invalid number of data points.


Modified: trunk/numpy/fft/fftpack.py
===================================================================
--- trunk/numpy/fft/fftpack.py	2006-11-20 02:27:26 UTC (rev 3451)
+++ trunk/numpy/fft/fftpack.py	2006-11-20 07:01:35 UTC (rev 3452)
@@ -36,6 +36,8 @@
     a = asarray(a)
 
     if n == None: n = a.shape[axis]
+    
+    if n < 1: raise ValueError("Invalid number of FFT data points (%d) specified." % n)
 
     try:
         wsave = fft_cache[n]



More information about the Numpy-svn mailing list