I have three two matrices A
and B
, the matrix product I want is diagonal(A.B.A^T)
, where A^T
is transpose of a matrix. The dimensions of the matrices are as follows
A - (2^n, n)
B - (n, n)
where is n
is any natural number.
I want first row slice of matrix A
to be multiplied with matrix B
and their product is multiplied with first column of matrix A^T
. I don't want the full product of A.B.A^T
because I only want the diagonal slice.
It seems to me this can be achieved using eisum.
A related question on codereview