On Wed, Apr 01, 2009 at 01:40:54AM +, Hans-Andreas Engel wrote:
> By the way, matrix multiplication is one of the testcases for the generalized
> ufuncs in numpy 1.3 -- this makes playing around with it easy:
> In [1]: N = 10; a = randn(N, 4, 4); b = randn(N, 4, 4)
> In [2]: import numpy.
Robert Kern gmail.com> writes:
> On Sat, Mar 28, 2009 at 23:15, Anne Archibald gmail.com>
wrote:
> > 2009/3/28 Geoffrey Irving naml.us>:
> >> On Sat, Mar 28, 2009 at 12:47 AM, Robert Kern gmail.com>
wrote:
> >>> 2009/3/27 Charles R Harris gmail.com>:
>
> On Fri, Mar 27, 2009 at 4:43
>
> I think dot will work, though you'll need to work a little bit to get the
> answer:
>
> >>> import numpy as np
> >>> a = np.array([[1,2], [3,4]], np.float)
> >>> aa = np.array([a,a+1,a+2])
> >>> bb = np.array((a*5, a*6, a*7, a*8))
> >>> np.dot(aa, bb).shape
> (3, 2, 4, 2)
> >>> for i, a_ in
Le Friday 27 March 2009 23:38:25 Bryan Cole, vous avez écrit :
> I have a number of arrays of shape (N,4,4). I need to perform a
> vectorised matrix-multiplication between pairs of them I.e.
> matrix-multiplication rules for the last two dimensions, usual
> element-wise rule for the 1st dimension (
On Sat, Mar 28, 2009 at 23:15, Anne Archibald wrote:
> 2009/3/28 Geoffrey Irving :
>> On Sat, Mar 28, 2009 at 12:47 AM, Robert Kern wrote:
>>> 2009/3/27 Charles R Harris :
On Fri, Mar 27, 2009 at 4:43 PM, Robert Kern wrote:
>
> On Fri, Mar 27, 2009 at 17:38, Bryan Cole wrote:
2009/3/28 Geoffrey Irving :
> On Sat, Mar 28, 2009 at 12:47 AM, Robert Kern wrote:
>> 2009/3/27 Charles R Harris :
>>>
>>> On Fri, Mar 27, 2009 at 4:43 PM, Robert Kern wrote:
On Fri, Mar 27, 2009 at 17:38, Bryan Cole wrote:
> I have a number of arrays of shape (N,4,4). I need to p
On Sat, Mar 28, 2009 at 12:47 AM, Robert Kern wrote:
> 2009/3/27 Charles R Harris :
>>
>> On Fri, Mar 27, 2009 at 4:43 PM, Robert Kern wrote:
>>>
>>> On Fri, Mar 27, 2009 at 17:38, Bryan Cole wrote:
>>> > I have a number of arrays of shape (N,4,4). I need to perform a
>>> > vectorised matrix-mul
2009/3/27 Charles R Harris :
>
> On Fri, Mar 27, 2009 at 4:43 PM, Robert Kern wrote:
>>
>> On Fri, Mar 27, 2009 at 17:38, Bryan Cole wrote:
>> > I have a number of arrays of shape (N,4,4). I need to perform a
>> > vectorised matrix-multiplication between pairs of them I.e.
>> > matrix-multiplicat
On Fri, Mar 27, 2009 at 4:43 PM, Robert Kern wrote:
> On Fri, Mar 27, 2009 at 17:38, Bryan Cole wrote:
> > I have a number of arrays of shape (N,4,4). I need to perform a
> > vectorised matrix-multiplication between pairs of them I.e.
> > matrix-multiplication rules for the last two dimensions,
On Fri, Mar 27, 2009 at 17:38, Bryan Cole wrote:
> I have a number of arrays of shape (N,4,4). I need to perform a
> vectorised matrix-multiplication between pairs of them I.e.
> matrix-multiplication rules for the last two dimensions, usual
> element-wise rule for the 1st dimension (of length N).
I have a number of arrays of shape (N,4,4). I need to perform a
vectorised matrix-multiplication between pairs of them I.e.
matrix-multiplication rules for the last two dimensions, usual
element-wise rule for the 1st dimension (of length N).
(How) is this possible with numpy?
thanks,
BC
_
Jean-Baptiste Rudant wrote:
>
> I would like to operate in an easy and efficient way (without python loop)
> with arrays of matrices.
>
> Suppose a and b are some arrays of N1*N2 matrices of size 3*3, I would
> like to calculate inv_a and dot_ab, which would be arrays of N1*N2
> (3*3)-matrice
On Mon, Jan 26, 2009 at 11:59 PM, Jean-Baptiste Rudant
wrote:
> Hello,
> I would like to operate in an easy and efficient way (without python
> loop) with arrays of matrices.
> Suppose a and b are some arrays of N1*N2 matrices of size 3*3, I would like
> to calculate inv_a and dot_ab, which would
Hello,
I would like to operate in an easy and efficient way (without python loop) with
arrays of matrices.
Suppose a and b are some arrays of N1*N2 matrices of size 3*3, I would like to
calculate inv_a and dot_ab, which would be arrays of N1*N2 (3*3)-matrices,
such as :
inv_a[i, j] = np.lin
14 matches
Mail list logo