[Numpy-discussion] fast SSD

Alex Flint alex.flint at gmail.com
Tue Jun 21 20:09:17 EDT 2011


Is there a fast way to compute an array of sum-of-squared-differences
between a (small)  K x K array and all K x K sub-arrays of a larger array?
(i.e. each element x,y in the output array is the SSD between the small
array and the sub-array (x:x+K, y:y+K)

My current implementation loops over each sub-array and computes the SSD
with something like ((A-B)**2).sum().

Cheers,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110621/b641ff1a/attachment.html>


More information about the NumPy-Discussion mailing list