[Numpy-discussion] arrays of matrices

Geoffrey Irving irving@pixar....
Thu Feb 28 16:34:47 CST 2008


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 index or treat it
as independent between the two arguments.

Is this case, I can use the fact that 3 is small to do it, but
is there a clean way for handle this kind of "array of matrix"
situation in general?

Thanks,
Geoffrey


More information about the Numpy-discussion mailing list