Optimisation of matrix multiplication
![](https://secure.gravatar.com/avatar/9bf244c487ed59f016d93ccf42929914.jpg?s=120&d=mm&r=g)
Jan. 30, 2018
6:22 a.m.
Hi all, I have a matrix multiplication that I'd like to optimize. I have a matrix `a` (dtype=complex) with shape (N, M, 2, 2). I'd like to do the following multiplication: a[:, 0] @ a[:, 1] @ ... @ a[:, M-1] where the first dimension, N, is element wise (and hopefully vectorisable) and M>=2. So for each row do M-1 matrix multiplications of 2x2 matrices. The output should have shape (N, 2, 2). What would be the best way of going about this? -- _____________________________________ Dr. Andrew Nelson _____________________________________
2574
Age (days ago)
2574
Last active (days ago)
1 comments
1 participants
participants (1)
-
Andrew Nelson