I have an expression of the type

expr = x1

where x1 is a symbol.

I want to be able to replace x1 by a certain type of object, defined 
elsewhere. I tried something like

import sympy as sp
x1=  sp.symbols('x1')
obj1 = Obj()
expr=x1
expr.subs([(x1,obj1)])

but it doesn't perform any substitution.

Is it possible to use subs() with an arbitrary object, or is there a way 
around it?


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/7ced1ea3-a275-472e-9c3b-5950cb000b98o%40googlegroups.com.

Reply via email to