Matrixmultiply on multidimensional arrays

Fernando Pérez fperez528 at yahoo.com
Thu May 23 19:43:55 EDT 2002


Chris Fonnesbeck wrote:

> I'm hoping someone can help me with this matrix multiplication
> problem: I am trying to multiply a 2x2x3 matrix (A below) with a
> 2x2x3x3 matrix (B below), such that each of the inner rows in A are
> multiplied by the 3x3 inner matrices in B, to result in a 2x2x3
> matrix. In other words, a regular matrix operation is embedded within
> a 2x2 matrix. Can I do this without flattening these out?
> 


Take a look at Numeric, that's what it was written for.

Cheers,

f



More information about the Python-list mailing list