I would like to express formulas that involve both traditional 
matrix-matrix multiplication and elementwise multiplication.  To be clear, 
these are the operations that correspond to "*" and ".*" in MATLAB, 
respectively.  I don't want to actually instantiate matrices, as I'm not 
interested in their components (the final result I'm looking for is to 
generate Python or MATLAB code that also won't ever index into the 
matrices).  For instance, if A, B, C are three square matrices of size n x 
n, I would like to be able to express what is meant by the MATLAB code

A*(B.*C)

which should mean

\sum_j A_{ij} ( \sum_{p,q} B_{pq} * C_{pq} )_{jk}

Is there any way to do this in Sympy?

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sympy/-/eSamUwyV22kJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to