scipy/scipy — pull request #337 by endolith (2012-10-12 20:44:28+00:00)
Title: Changes to `convolve`, `fftconvolve`, ...

1. Made the error messages for invalid sizes consistent
2. convolve2d had the check for 'valid' mode size but correlate2d didn't (just output an empty array), so I added it.
3. The same check should be added to fftconvolve, I think. currently it uses whichever array is bigger, which I think is the "old behavior" [that was removed from the other functions here](https://github.com/scipy/scipy/commit/6b32937aafcbbb3e4758ddf67da8d573b88b1682#commitcomment-1989299).
4. Used `rfftn` for real-input fftconvolve to double the speed, as [I mistakenly suggested on the numpy trac](http://projects.scipy.org/numpy/ticket/1260#comment:7). (I hope I did this right and it doesn't break in weird cases)
5. docstring cleanup, typos, etc.
6. fftconvolve [dies with zero-size inputs](http://projects.scipy.org/scipy/ticket/1745), so maybe should add some checks to reject those?
7. (I think convolve/correlate/convolve2d/correlate2d should have an `fft={True, False, 'auto'}` option that calls fftconvolve, as in the numpy feature request, but that requires discussion)