<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 4, 2020 at 1:49 AM Chris Vavaliaris <<a href="mailto:cv1038@wildcats.unh.edu">cv1038@wildcats.unh.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">PR #16999: <a href="https://github.com/numpy/numpy/pull/16999" rel="noreferrer" target="_blank">https://github.com/numpy/numpy/pull/16999</a><br>
<br>
Hello all,<br>
this PR adds the two 1D Chebyshev transform functions `chebyfft` and<br>
`ichebyfft` into the `numpy.fft` module, utilizing the real FFTs `rfft` and<br>
`irfft`, respectively. As far as I understand, `pockefft` does not support<br>
cosine transforms natively; for this reason, an even extension of the input<br>
vector is constructed, whose real FFT corresponds to a cosine transform.<br>
<br>
The motivation behind these two additions is the ability to quickly perform<br>
direct and inverse Chebyshev transforms with `numpy`, without the need to<br>
write scripts that do the necessary (although minor) modifications.<br>
Chebyshev transforms are used often e.g. in the spectral integration of PDE<br>
problems; thus, I believe having them implemented in `numpy` would be useful<br>
to many people in the community.<br>
<br>
I'm happy to get comments/feedback on this feature, and on whether it's<br>
something more people would be interested in. Also, I'm not entirely sure<br>
what part of this functionality is/isn't present in `scipy`, so that the two<br>
`fft` modules remain consistent with one another. <br></blockquote><div><br></div><div>Hi Chris, that's a good question. scipy.fft is a superset of numpy.fft, and the functionality included in NumPy is really only the basics that are needed in many fields. The reason for the duplication stems from way back when we had no wheels and SciPy was very hard to install. So I don't think there's anything we'd add to numpy.fft at this point.</div><div><br></div><div>As I commented on your PR, it would be useful to add some references and applications, and then make your proposal on the scipy-dev list.<br></div><div><br></div><div>Cheers,<br></div><div>Ralf</div></div></div>