fjarri/reikna

interface module for scipy api parity?

tlambert03 opened this issue · 2 comments

Hi again,

one of the reasons I was asking about real transforms in #57 is that I'm working on thin FFT library wrapper that provides the same (scipy.fft) API for different library backends. a lot of them already have parity of course (scipy, numpy, and cupy are largely interchangeable)... but my impression was that a little wrapping would be necessary for reikna.

I'm curious if this is something you'd want to have in this package? like a reikna.fft.interfaces module (similar to pyfftw.interfaces)... I could submit a PR if it's something you'd consider. but understand if it feels out of scope.

The thing with Reikna's FFT (and other algorithms), is that generally you won't use them by themselves. Their value is in composing them together in computations and attaching transformations. I think the interfaces bit might be better off covered from your side (in anyfft), and Reikna can provide real-to-real/real-to-complex FFT computations (as wrappers of FFT + transformations). This way, anyfft won't have to worry about transformations, and Reikna users will be able to compose these new computations however they like.

Or am I missing some scenario where an interfaces module on Reikna's side will be more convenient?

Makes sense!
No, no particular convenience about having the interface on the reikna side. Just figured I'd mention it.
Thanks!