[SciPy-User] How to efficiently do dot(dot( A.T, diag(d) ), A ) ?

josef.pktd@gmai... josef.pktd@gmai...
Sun Sep 9 20:28:55 CDT 2012


On Sun, Sep 9, 2012 at 9:19 PM, Hugh Perkins <hughperkins@gmail.com> wrote:
> How to do efficiently do dot(dot( A.T, diag(d) ), A ) ?

dot( A.T * d , A )

IIRC

Josef

>
> ... where d is of length n, A is n * k, and n >> k
>
> (obviously the i,j element of this is just sum_r A_{r,i) * A_{r,j} *
> d_r , which is in theory relatively fast, at least, a lot faster than
> two brute-force matrix muliplies! )
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user


More information about the SciPy-User mailing list