2009/3/27 Charles R Harris <charlesr.har...@gmail.com>:
>
> On Fri, Mar 27, 2009 at 4:43 PM, Robert Kern <robert.k...@gmail.com> wrote:
>>
>> On Fri, Mar 27, 2009 at 17:38, Bryan Cole <br...@cole.uklinux.net> 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).
>> >
>> > (How) is this possible with numpy?
>>
>> dot(a,b) was specifically designed for this use case.
>
> I think maybe he wants to treat them as stacked matrices.

Oh, right. Sorry. dot(a, b) works when a is (N, 4, 4) and b is just
(4, 4). Never mind.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to