2 ms·
I hope I remember these things correct. Let's assume you have two 3D arrays and you want to form the point wise product and sum over the middle index, you can p
by andi999 6y ago
I hope I remember these things correct. Let's assume you have two 3D arrays and you want to form the point wise product and sum over the middle index, you can probably write sum(a*b, 1). Anything more complicated there is numpy einsum (check it out) https://numpy.org/doc/stable/reference/generated/numpy.einsum.html https://numpy.org/doc/stable/reference/generated/numpy.einsu...
Letme know how these things can be nicely done in Matlab.
One problem I had in Matlab is some vectorization requires to permute the indices, but this is expensive if your array is hundreds of megabyte.