[SciPy-dev] DCT naming conventions ?

william ratcliff william.ratcliff@gmail....
Sun Jan 18 11:04:42 CST 2009


I like your arguments idea,
dct(...,type=number)
idct(...,type=number).

maybe the type could default to 2 for dct and idct (with the implementation
of idct for type 2 being dct of type3).  This would make life easier for
users.



William

On Sun, Jan 18, 2009 at 11:30 AM, David Cournapeau <cournape@gmail.com>wrote:

> 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) ?
>
> David
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-dev/attachments/20090118/49b0b396/attachment.html 


More information about the Scipy-dev mailing list