On Sun, Oct 21, 2012 at 1:58 PM, David Ketcheson <[email protected]> wrote:
> I would like to express formulas that involve both traditional matrix-matrix
> multiplication and elementwise multiplication.  To be clear, these are the

The following is from the docs on Matrix Expressions:


>>> from sympy import MatrixSymbol, Matrix
>>> X = MatrixSymbol('X', 3, 3)
>>> Y = MatrixSymbol('Y', 3, 3)
>>> (X.T*X).I*Y
X^-1*X'^-1*Y

>>> Matrix(X)
[X_00, X_01, X_02]
[X_10, X_11, X_12]
[X_20, X_21, X_22]

>>> (X*Y)[1, 2]
X_10*Y_02 + X_11*Y_12 + X_12*Y_22

So yes, you can do abstract value-agnostic manipulations. Although
there is a matrix_multiply_elementwise function that operates on
regular matrices, I don't think that there is an implementation yet
for MatrixExpr.

Chris

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
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