Re: [Numpy-discussion] effectively computing variograms with numpy

2007-06-26 Thread Hanno Klemm
Didrik, thanks, I'll definitely will have a look at this. Hanno Didrik Pinte [EMAIL PROTECTED] said: --=-aUNlfGW7wc8MzGzdSDGo Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 2007-06-25 at 23:09 +0200, Hanno Klemm wrote: I will try and dig a bit more in

Re: [Numpy-discussion] effectively computing variograms with numpy

2007-06-25 Thread Hanno Klemm
Tim, Thank you very much, the code does what's it expected to do. Unfortunately the thing is still pretty slow on large data sets. I will probably now look for ways to calculate the variogram from some random samples of my data. Thanks for the observation regarding the square array, that would

Re: [Numpy-discussion] effectively computing variograms with numpy

2007-06-25 Thread Timothy Hochberg
On 6/25/07, Hanno Klemm [EMAIL PROTECTED] wrote: Tim, Thank you very much, the code does what's it expected to do. Unfortunately the thing is still pretty slow on large data sets. This does seem like the kind of thing that there should be a faster way to compute, particularly since you are

Re: [Numpy-discussion] effectively computing variograms with numpy

2007-06-25 Thread Hanno Klemm
I will try and dig a bit more in the literature, maybe I find something. Hanno On Jun 25, 2007, at 4:59 PM, Timothy Hochberg wrote: On 6/25/07, Hanno Klemm [EMAIL PROTECTED] wrote: Tim, Thank you very much, the code does what's it expected to do. Unfortunately the thing is still

[Numpy-discussion] effectively computing variograms with numpy

2007-06-22 Thread Hanno Klemm
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

Re: [Numpy-discussion] effectively computing variograms with numpy

2007-06-22 Thread Timothy Hochberg
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

Re: [Numpy-discussion] effectively computing variograms with numpy

2007-06-22 Thread Timothy Hochberg
OK, generally in code like this I leave the outer loops alone and try to vectorize just the inner loop.I have some ideas in this direction, but first, there seems to be some problems with the code at well. The code looks like it is written to take non-square 'data' arrays. However, for i