[Numpy-discussion] Add Chebyshev (cosine) transforms implemented via FFTs
cv1038 at wildcats.unh.edu
Mon Aug 3 20:39:51 EDT 2020
PR #16999: https://github.com/numpy/numpy/pull/16999
this PR adds the two 1D Chebyshev transform functions `chebyfft` and
`ichebyfft` into the `numpy.fft` module, utilizing the real FFTs `rfft` and
`irfft`, respectively. As far as I understand, `pockefft` does not support
cosine transforms natively; for this reason, an even extension of the input
vector is constructed, whose real FFT corresponds to a cosine transform.
The motivation behind these two additions is the ability to quickly perform
direct and inverse Chebyshev transforms with `numpy`, without the need to
write scripts that do the necessary (although minor) modifications.
Chebyshev transforms are used often e.g. in the spectral integration of PDE
problems; thus, I believe having them implemented in `numpy` would be useful
to many people in the community.
I'm happy to get comments/feedback on this feature, and on whether it's
something more people would be interested in. Also, I'm not entirely sure
what part of this functionality is/isn't present in `scipy`, so that the two
`fft` modules remain consistent with one another.
Sent from: http://numpy-discussion.10968.n7.nabble.com/
More information about the NumPy-Discussion