Re: [Numpy-discussion] installing numpy in jython (in Netbeans)

2012-08-26 Thread Todd Brunhoff
Chris, I appreciate the pointers, which appear to confirm that numpy and jython are a ways out. I can see where the c-api support in jython would be required by numpy's implementation. > 1) [NetBeans support for CPython] -- Maybe this: > http://wiki.netbeans.org/Python That seems outdated. I ha

Re: [Numpy-discussion] installing numpy in jython (in Netbeans)

2012-08-26 Thread Chris Barker
Todd, The short version is: you can't do that. -- Jython uses the JVM, numpy is very, very tied into the CPython runtime. This thread is a bit old, but think still holds: http://stackoverflow.com/questions/3097466/using-numpy-and-cpython-with-jython There is the junumeric project, but it doesn'

[Numpy-discussion] installing numpy in jython (in Netbeans)

2012-08-26 Thread Todd Brunhoff
Being a newbie to this list, I recognize that the answer to this might be "why would you do that?". But surely it can't be worse than that. Briefly put, I want to install numpy and scipy in jython (reasons below). Running 'cd ; jython setup.py install' runs into errors. But installing he same

Re: [Numpy-discussion] vectorized multi-matrix multiplication

2012-08-26 Thread Alex Flint
Thank you. On Sun, Aug 26, 2012 at 11:04 AM, Alex Flint wrote: > I have two lists of 3x3 arrays and I would like to compute the matrix > product of the i-th element in the first list with the i-th element in > the second list. Of course, I could just loop over the lists: > > for i in range(n): >

Re: [Numpy-discussion] vectorized multi-matrix multiplication

2012-08-26 Thread Jonathan Taylor
Assuming matrices1 and matrices2 are actually arrays of size (N, 3, 3) you can do: np.einsum('nij,njk->nik', matrices1, matrices2) On Sun, Aug 26, 2012 at 11:04 AM, Alex Flint wrote: > I have two lists of 3x3 arrays and I would like to compute the matrix > product of the i-th element in the firs

[Numpy-discussion] vectorized multi-matrix multiplication

2012-08-26 Thread Alex Flint
I have two lists of 3x3 arrays and I would like to compute the matrix product of the i-th element in the first list with the i-th element in the second list. Of course, I could just loop over the lists: for i in range(n): out[i] = dot( matrices1[i], matrices2[i] ) However, the list is quite