Open
Description
Description
This is what numpy.convolve uses under the hood, but we can avoid the python overhead in the C-backend: https://numpy.org/devdocs/reference/c-api/array.html#c.PyArray_Correlate2
It may make sense to actually implement everything in terms of a correlate1d
and have the convolve1dbe a call on
correlate1dwith the flipped input. Since under the hood calling
np.convolve` is doing this flip anyway.
correlate1d shows up in the gradient of convolve1d (note the [::-1] inputs)
pytensor/pytensor/tensor/signal/conv.py
Lines 68 to 71 in afb7695