xtensor-stack/xtensor-fftw

Broadcasting of FFT

yoshipon opened this issue · 5 comments

Thank you for developing xtensor-fftw.
I would like to request the following extension that will be improve its usability.

It will be better if there is a broadcasting in xtensor-fftw.
I'm studying on multi-channel acoustic signal processing, and often have to conduct FFTs to microphones.
In numpy, we can broadcast FFT like this way

np.fft.rfft(np.ndarray([M, T]), axis=1).shape

In my case M and T indicates the number of microphones and time frames.
This will be simplify codes of such signal processings.

Best,

It might be possible to implement this very efficiently using the multiple FFT functionality of FFTW.

Thank you for the reply.
That's a good idea to use fftw_plan_many_*.

This would be great!

bigpo commented

could xtensor-fftw offer a wrapper for fftw_plan_many_*? @egpbos

Definitely @bigpo. If you have time to make a PR for it, I'd be happy to help you get that merged. Let me know if you need anything.