On 6/22/07, Hanno Klemm <[EMAIL PROTECTED]> wrote:
Hi, I have an array which represents regularly spaced spatial data. I now would like to compute the (semi-)variogram, i.e. gamma(h) = 1/N(h) \sum_{i,j\in N(h)} (z_i - z_j)**2, where h is the (approximate) spatial difference between the measurements z_i, and z_j, and N(h) is the number of measurements with distance h. However, I only want to calculate the thing along the rows and columns. The naive approach involves two for loops and a lot of searching, which becomes painfully slow on large data sets. Are there better implementations around in numpy/scipy or does anyone have a good idea of how to do that more efficient? I looked around a bit but couldn't find anything.
Can you send the naive code as well. Its often easier to see what's going on with code in addition to the equations. Regards. -tim -- . __ . |-\ . . [EMAIL PROTECTED]
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion