[SciPy-dev] DCT naming conventions ?

David Cournapeau cournape@gmail....
Sun Jan 18 10:30:37 CST 2009

On Mon, Jan 19, 2009 at 12:25 AM, Stéfan van der Walt <stefan@sun.ac.za> wrote:
> 2009/1/18 David Cournapeau <david@ar.media.kyoto-u.ac.jp>:
>>    I needed DCT transforms, so I finished implementing them in scipy
>> (both single and double prec):
>> http://projects.scipy.org/scipy/scipy/browser/trunk/scipy/fftpack/realtransforms.py
>>    - dct3 and dct2 are inverse from each other (compared to dct/idct
>> notation of matlab; dct2(x, norm=ortho) is the same as matlab dct(x),
>> and dct3(x, norm='ortho') is the same as matlab idct.
> While this naming is accurate, it is confusing in relation to the
> other FFT functions.  I prefer "dct" and "idct".

Calling them dct/idct can be confusing as well: dct3(dct2(x)) != x
(because of normalization). And what to do for dct1/dct4 - in theory,
there are 8 dct possible, and 8 dst as well (I have no use for dst, so
I did not implement them, but they should follow at some point).

Maybe the type could be an argument: dct(..., type=number) ?


More information about the Scipy-dev mailing list