[Numpy-discussion] Apply transform to many small matrices

Jorge Scandaliaris jorgesmbox-ml at yahoo.es
Wed Feb 27 13:32:00 EST 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