3

scipy.signal.fftconvolve doesn't seem to have an axes parameter like for example numpy.fft.fftn, meaning out of the box it will convolve along all axes.

I'm looking for the most painless way to have it only convolve along a given subset of axes. Does anyone know a workaround or shortcut?

Paul Panzer
  • 51,835
  • 3
  • 54
  • 99
  • 1
    It's an [open issue](https://github.com/scipy/scipy/issues/3525)... The alternatives appear to be: (1) call fftconvolve in a loop, passing to it the slices that you want to be transformed, one by one; (2) copy the source of fftconvolve ([pretty short](https://github.com/scipy/scipy/blob/v0.18.1/scipy/signal/signaltools.py#L246-L378)) and add axes parameter, then passing it to fftn; (3) write a PR to SciPy addressing the issue... –  Jan 28 '17 at 04:34
  • Thanks! Not quite as painless as I had hoped, but (2) looks ok-ish. – Paul Panzer Jan 28 '17 at 05:12

0 Answers0