Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Let sage_eval evaluate in the namespace of the locals dictionary.

expr = sage_eval(xx,locals=locals())

Let sage_eval evaluate in the namespace of the locals dictionary.

expr = sage_eval(xx,locals=locals())

Or do you need something like this:

var_list =['a'+str(k) for k in (11..20)]
vars = dict([(v,var(v)) for v in var_list])
sage_eval('2*a11 +a14^a13-a12',locals=vars)