Ask Your Question

Getting symbolic variable without resetting python variable.

asked 2016-04-01 23:11:17 +0200

rlg23 gravatar image

When calling


the variable x gets set to the symbolic expression x just as if we had called

x = var('x')

In particular, any value stored in x is deleted. Is there a way to get a symbolic variable without setting the python variable to be that symbolic variable? I'm not super familiar with how sage handles symbolic variables so this might be unreasonable.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-04-02 00:52:40 +0200

vdelecroix gravatar image

updated 2016-04-02 00:53:10 +0200

Yes there is

sage: t = 19
sage: my_variable = SR.var('t')
sage: t
sage: my_variable

The behavior of var is very strange and controversial.

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


Asked: 2016-04-01 23:11:17 +0200

Seen: 281 times

Last updated: Apr 02 '16