Representing a matrix-valued function

33 views
Skip to first unread message

Anton Akhmerov

unread,
Oct 24, 2022, 8:52:11 AM10/24/22
to sympy
Hello everyone,

I would like to represent a symbolic function whose argument is a matrix symbol and so is its output. To make a specific example, I would like an expression like to define F, such that F(X) + X works if X is a MatrixSymbol("X", n, n).

The closest that I was able to find in the docs is FunctionMatrix, but it doesn't quite get me there. Using F = sympy.Function("F") does not work neither.

Is there a way to achieve the desired result?

Aaron Meurer

unread,
Oct 24, 2022, 11:41:16 AM10/24/22
to sy...@googlegroups.com
There's currently an open issue for this
https://github.com/sympy/sympy/issues/5855.

For now, I think the only way to do it is to manually subclass MatrixExpr.

Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/24458147-5905-4619-8f57-5e5137cd7c07n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages