-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I am working on a project which involves calculating the inverse for matrices with symbolic entries. I am using Symbolics.jl to create the symbolic entries. While Symbolics.jl has been great for computing things like determinants and simplifying their results very quickly, there is a lack of finer-grain expression manipulation commands in the module, and thus I would like to convert my symbolic.jl objects to ones readable with SymPy.jl.
I am working on a project which involves calculating the inverse for matrices with symbolic entries. I am using Symbolics.jl to create the symbolic entries. While Symbolics.jl has been great for computing things like determinants and simplifying their results very quickly, there is a lack of finer-grain expression manipulation commands in the module, and thus I would like to convert my symbolic.jl objects to ones readable with SymPy.jl.
My current solution to this is to use Latexify.jl, great module name btw, to convert the objects to latex, then perform some dodgy string manipulation on the latex, specifically turning it into a form readable by the Python module latex2sympy2 which has a function latex2sympy which can properly convert it. I've written a function to_sympy() which properly converts the Num and Matrix{NUM} types: