Re: [Numpy-discussion] arrays of matrices

2008-02-28 Thread Geoffrey Irving
On Thu, Feb 28, 2008 at 06:55:11PM -0600, Robert Kern wrote: > On Thu, Feb 28, 2008 at 6:43 PM, Geoffrey Irving <[EMAIL PROTECTED]> wrote: > > > The magic is in In[27]. We reshape the array of vectors to be > > > compatible with the shape of the array of matrices. When we multiply > > > the two

Re: [Numpy-discussion] arrays of matrices

2008-02-28 Thread Robert Kern
On Thu, Feb 28, 2008 at 6:43 PM, Geoffrey Irving <[EMAIL PROTECTED]> wrote: > > The magic is in In[27]. We reshape the array of vectors to be > > compatible with the shape of the array of matrices. When we multiply > > the two together, it is as if we multiplied two (n,3,3) matrices, the > > la

Re: [Numpy-discussion] arrays of matrices

2008-02-28 Thread Geoffrey Irving
On Thu, Feb 28, 2008 at 05:57:29PM -0600, Robert Kern wrote: > On Thu, Feb 28, 2008 at 4:34 PM, Geoffrey Irving <[EMAIL PROTECTED]> wrote: > > Hello, > > > > I have a large number of points (shape (n,3)), and a matching > > number of 3x3 matrices (shape (n,3,3)), and I want to compute > > the pr

Re: [Numpy-discussion] arrays of matrices

2008-02-28 Thread Robert Kern
On Thu, Feb 28, 2008 at 4:34 PM, Geoffrey Irving <[EMAIL PROTECTED]> wrote: > Hello, > > I have a large number of points (shape (n,3)), and a matching > number of 3x3 matrices (shape (n,3,3)), and I want to compute > the product of each matrix times the corresponding point. > > I can't see a wa

[Numpy-discussion] arrays of matrices

2008-02-28 Thread Geoffrey Irving
Hello, I have a large number of points (shape (n,3)), and a matching number of 3x3 matrices (shape (n,3,3)), and I want to compute the product of each matrix times the corresponding point. I can't see a way to do this operation with dot or tensordot, since these routines either sum across an inde