Sympy subs vs replace vs xreplace

Viewed 1104

What is the difference between subs, replace, and xreplace in sympy?

I have been using subs for substitution of symbolics. I was discussing with someone and they recommended using replace instead of subs for most cases. Then I also stumbled on xreplace.

For my application I am substituting an expression in for a variable. Is one of these recommended over the other for that? What are the main uses for each? Which one would generally be recommended?

0 Answers
Related