On 12/12/2009 22:55, T J wrote:
> Hi,
>
> Suppose I have an array of shape: (n, k, k). In this case, I have n
> k-by-k matrices. My goal is to compute the product of a (potentially
> large) user-specified selection (with replacement) of these matrices.
> For example,
>
> x = [0,1,2,1,3,3,2,1
2009/12/12 T J :
> Hi,
>
> Suppose I have an array of shape: (n, k, k). In this case, I have n
> k-by-k matrices. My goal is to compute the product of a (potentially
> large) user-specified selection (with replacement) of these matrices.
> For example,
>
> x = [0,1,2,1,3,3,2,1,3,2,1,5,3,2,3,5,
Le samedi 12 décembre 2009 à 01:55 -0800, T J a écrit :
> Is there a better way?
You may have a look at http://scipy.org/Cookbook/MultiDot
Several alternatives are proposed.
Cheers,
--
Denis
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
On Sat, Dec 12, 2009 at 4:55 PM, T J wrote:
> Hi,
>
> Suppose I have an array of shape: (n, k, k). In this case, I have n
> k-by-k matrices. My goal is to compute the product of a (potentially
> large) user-specified selection (with replacement) of these matrices.
> For example,
>
> x = [0,1,
Hi,
Suppose I have an array of shape: (n, k, k). In this case, I have n
k-by-k matrices. My goal is to compute the product of a (potentially
large) user-specified selection (with replacement) of these matrices.
For example,
x = [0,1,2,1,3,3,2,1,3,2,1,5,3,2,3,5,2,5,3,2,1,3,5,6]
says that I