Re: [Numpy-discussion] Repeated Dot Operations

2009-07-20 Thread Robert Kern
On Mon, Jul 20, 2009 at 05:27, T J wrote: > Hi, > > Is there a good way to perform dot on an arbitrary list of arrays > which avoids using a loop?  Here is what I'd like to avoid: > > # m1, m2, m3  are arrays out = np.(m1.shape[0]) prod = [m1, m2, m3, m1, m2, m3, m3, m2] for m in pro

[Numpy-discussion] Repeated Dot Operations

2009-07-20 Thread T J
Hi, Is there a good way to perform dot on an arbitrary list of arrays which avoids using a loop? Here is what I'd like to avoid: # m1, m2, m3  are arrays >>> out = np.(m1.shape[0]) >>> prod = [m1, m2, m3, m1, m2, m3, m3, m2] >>> for m in prod: ... out = np.dot(out, m) ... I was hoping for somet