micropython-ulab icon indicating copy to clipboard operation
micropython-ulab copied to clipboard

[FEATURE REQUEST] add numpy.correlate

Open v923z opened this issue 2 years ago • 2 comments

As described in https://github.com/v923z/micropython-ulab/discussions/597, add the C implementation of https://numpy.org/doc/stable/reference/generated/numpy.correlate.html

@hamza-712

v923z avatar Apr 23 '23 19:04 v923z

@hamza-712 Actually, you can already calculate the correlation of two arrays by flipping one of them, and calling convolve. Would that not work for you? If you use slices as in a[::-1], then you don't even waste RAM, because the slice is just a view, so no memory allocation takes place.

v923z avatar Apr 24 '23 06:04 v923z

@v923z Thanks, I've implemented just like you said.

hamza-712 avatar May 27 '23 09:05 hamza-712