Dear list,
I have a 4D array, A, that has the shape (NX, NY, 2, 2). I wish to perform
matrix multiplication of the 'NY' 2x2 matrices, resulting in the matrix B.
B would have shape (NX, 2, 2). I believe that np.einsum would be up to the
task, but I'm not quite sure of the subscripts I would need
Andrew Nelson writes:
Dear list,I have a 4D array, A, that has the shape (NX, NY, 2, 2). I
wish to perform matrix multiplication of the 'NY' 2x2 matrices, resulting
in the matrix B. B would have shape (NX, 2, 2). I believe that np.einsum
would be up to the task, but I'm not quite sure of
You need to specify your input format. Also, if your output matrix misses
the NY dimension, that implies you wish to contract (sum) over it, which
contradicts your statement that the 2x2 subblocks form the matrices to
multiply with. In general, I think it would help if you give a little more
On Mi, 2014-10-29 at 20:39 +1100, Andrew Nelson wrote:
Dear list,
I have a 4D array, A, that has the shape (NX, NY, 2, 2). I wish to
perform matrix multiplication of the 'NY' 2x2 matrices, resulting in
the matrix B. B would have shape (NX, 2, 2). I believe that
np.einsum would be up to the
On Mi, 2014-10-29 at 13:05 +0100, Sebastian Berg wrote:
On Mi, 2014-10-29 at 20:39 +1100, Andrew Nelson wrote:
Dear list,
I have a 4D array, A, that has the shape (NX, NY, 2, 2). I wish to
perform matrix multiplication of the 'NY' 2x2 matrices, resulting in
the matrix B. B would have
On Wed, Oct 29, 2014 at 10:39 AM, Andrew Nelson andyf...@gmail.com wrote:
Dear list,
I have a 4D array, A, that has the shape (NX, NY, 2, 2). I wish to
perform matrix multiplication of the 'NY' 2x2 matrices, resulting in the
matrix B. B would have shape (NX, 2, 2). I believe that np.einsum
On Wed, Oct 29, 2014 at 5:39 AM, Andrew Nelson andyf...@gmail.com wrote:
I have a 4D array, A, that has the shape (NX, NY, 2, 2). I wish to
perform matrix multiplication of the 'NY' 2x2 matrices, resulting in the
matrix B. B would have shape (NX, 2, 2).
What you are looking for is