# [Scipy-svn] r5518 - trunk/scipy/fftpack

scipy-svn@scip... scipy-svn@scip...
Sat Jan 24 04:32:36 CST 2009

```Author: cdavid
Date: 2009-01-24 04:32:22 -0600 (Sat, 24 Jan 2009)
New Revision: 5518

Modified:
trunk/scipy/fftpack/realtransforms.py
Log:
Fix DCT docstring: sum index boundaris and normalization note for DCT-I.

Modified: trunk/scipy/fftpack/realtransforms.py
===================================================================
--- trunk/scipy/fftpack/realtransforms.py	2009-01-24 08:06:32 UTC (rev 5517)
+++ trunk/scipy/fftpack/realtransforms.py	2009-01-24 10:32:22 UTC (rev 5518)
@@ -50,10 +50,13 @@

for 0 <= k < N,

-                                           N-1
+                                           N-2
y[k] = x[0] + (-1)**k x[N-1] + 2 * sum x[n]*cos(pi*k*n/(N-1))
-                                           n=0
+                                           n=1

+    Only None is supported as normalization mode for DCT-I. Note also that the
+    DCT-I is only supported for input size > 1
+
type II
~~~~~~~
There are several definitions of the DCT-II; we use the following (for
@@ -76,13 +79,13 @@

N-1
y[k] = x[0] + 2 * sum x[n]*cos(pi*(k+0.5)*n/N), 0 <= k < N.
-                          n=0
+                          n=1

Or (norm='ortho'), for 0 <= k < N:

N-1
y[k] = x[0] / sqrt(N) + sqrt(1/N) * sum x[n]*cos(pi*(k+0.5)*n/N)
-                                            n=0
+                                            n=1

The (unnormalized) DCT-III is the inverse of the (unnormalized) DCT-II, up
to a factor 2*N. The orthonormalized DCT-III is exactly the inverse of the

```