[Numpy-discussion] Apply transform to many small matrices

Jorge Scandaliaris jorgesmbox-ml@yahoo...
Wed Feb 27 12:32:00 CST 2013


Jaime Fernández del Río <jaime.frio <at> gmail.com> writes:

<snip>
> np.einsum makes a lot of these easier to figure out:
> In [7]: np.einsum('ijk, kl', A, T)
> Out[7]: 
> array([[[ 7, 10],
>         [15, 22]],
> 
>        [[23, 34],
>         [31, 46]],
> 
>        [[39, 58],
>         [47, 70]]])
> 

Thanks, I will have a look at it.

jorges



More information about the NumPy-Discussion mailing list