Re: [Numpy-discussion] nonuniform scatter operations

2008-09-28 Thread Geoffrey Irving
On Sat, Sep 27, 2008 at 10:01 PM, Nathan Bell <[EMAIL PROTECTED]> wrote: > On Sun, Sep 28, 2008 at 12:34 AM, Geoffrey Irving <[EMAIL PROTECTED]> wrote: >> >> Is there an efficient way to implement a nonuniform gather operation >> in numpy? Specifically, I want to do something like >> >> n,m = 100,

[Numpy-discussion] Help needed with the priority of 0d-arrays and np.scalars

2008-09-28 Thread Pierre GM
All, In a recent post, I was pointing to a bug in numpy.ma. I think I can understand what happens, but I'd need a couple of clarifications. When multiplying a 0d ndarrray or one of its subclass by a numpy scalar, we end up with a numpy scalar cast to the highest type, right ? So, np.float64(1)*n

[Numpy-discussion] Vectorization of the product of several matrices ?

2008-09-28 Thread oc-spam66
Hello, I have two lists of numpy matrices : LM = [M_i, i=1..N] and LN = [N_i, i =1..N] and I would like to compute the list of the products : LP = [M_i * N_i, i=1..N]. I can do : P=[] for i in range(N) : P.append(LM[i]*LN[i]) But this is not vectorized. Is there a faster solution ? Can

Re: [Numpy-discussion] Minimum distance between 2 paths in 3D

2008-09-28 Thread Andrea Gavana
Hi Rob & All, On Sat, Sep 27, 2008 at 4:05 PM, Rob Clewley wrote: > Hi Andrea, > >>I was wondering if someone had any suggestions/references/snippets >> of code on how to find the minimum distance between 2 paths in 3D. >> Basically, for every path, I have I series of points (x, y, z) and I >>