On Jul 4, 2012, at 7:36 AM, matthjes <[email protected]> wrote:

Am Mittwoch, 4. Juli 2012 15:31:01 UTC+2 schrieb Stefan Krastanov:
>
> > and I'd like to substitute "a/b" with "k". I would use "f.subs(a/b, k)",
>
> I would use `f.subs(a, k*b)`. It seems more consistent with the idea
> of substituting a *variable* with something else.
>

That's also possible, however, the docs say that "subs" should substitute
an expression, not just a variable, thats why I've tried the substitution
above.


It does, and it does it's best to use heuristics to find that expression,
but it can only go so far, and if the expression itself is not there, it
can fail. Substituting a Symbol will always work.

Aaron Meurer


But it's working now using "fraction", thanks for your help!

-- 
You received this message because you are subscribed to the Google Groups
"sympy" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sympy/-/K2bSo2GW1LMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to