Ask Your Question

Using Mathics and reusing its computed results

asked 2023-05-08 12:47:17 +0100

Cyrille gravatar image

As I am curious and a former Mathematica user, I have installed mathics on my computer then I have tried the following simple code

from sage.interfaces.mathics import mathics
sys = mathics('{x^2 - 3y == 3, 2x - y == 1}')

which works as expected (show() is not available for displaying the result since it returns the LaTeX code). Then I use


to convert sys to sageMath. Calling it I have

image description

But from there I have not found the way to extract the values of $x$ to reuse it in SageMath. Has some one a possible solution?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2023-05-08 18:19:53 +0100

Max Alekseyev gravatar image

I don't have access to mathics but my guess is that you need to define variables x and y in Sage first and then translate mathics' variables into those in Sage - like:

x, y = var('x y')
sys._sage_(locals={'x':x, 'y':y})
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2023-05-08 12:47:17 +0100

Seen: 77 times

Last updated: May 08 '23