[Numpy-discussion] convolve optimisation...
Stéfan van der Walt
Wed Jun 24 07:40:37 CDT 2009
2009/6/24 fred <firstname.lastname@example.org>:
> fred a écrit :
>> Hi all,
>> Say I have a 2D array A(nx, ny).
>> In each A[i, j] I want to compute convolve(a, kernel)
>> where a is subarray of A.
>> a and kernel are small besides A.
> I forgot to mention: kernel is not constant, of course.
> It varies vs. others parameters.
If your kernel varies with i and j, you have little choice but to do
this at the C level.
Have a look at the Cython convolution example here:
Alternatively, David Cournapeau can take this opportunity to
illustrate his very nifty Neighbour Iterator.
More information about the Numpy-discussion