I have a code on python I like to convert it to c++.
I have a probleme in this line how can I implement it in cpp.
y = scipy.ndimage.convolve1d(x1, x2, mode="constant")
I have a code on python I like to convert it to c++.
I have a probleme in this line how can I implement it in cpp.
y = scipy.ndimage.convolve1d(x1, x2, mode="constant")
You can use OpenCV filter2D function. Also you can try it in python to see if it does the thing that you want, it's pretty fast.
But if you want to implement the 1d convolution, the naïve implementation is just basically two nested for loops. Discrete convolution.