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

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

2007-06-26 Thread Didrik Pinte
On Mon, 2007-06-25 at 23:09 +0200, Hanno Klemm wrote: > I will try and dig a bit more in the literature, maybe I find something. > > Hanno I don't know if it can help. We started a project to convert BMELib (a matlab library) into Python. It's still bound with Numeric but it should be pretty stra

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

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 ar

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 ha

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 in

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

2007-06-22 Thread Hanno Klemm
Tim, this is the best I could come up with until now: import numpy as N def naive_variogram(data, binsize=100., stepsize=5.): """calculates variograms along the rows and columns of the given array which is supposed to contain equally spaced data with stepsize stepsize""" # how

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 measu

[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 measur