Hi,

On 25 February 2012 23:22, Coleman Broaddus <[email protected]>wrote:

> Sympy's subs function does not seem to be able to recognize negative
> multi-term expressions...
>
> x,y = symbols('x,y')
> e1_, e2_ = symbols('e1, e2')
> e1 = x
> e2 = 1+x
> [(e1).subs(e1,e1_), (-e1).subs(e1,e1_), (e2).subs(e2,e2_),
> (-e2).subs(e2,e2_)]
>
> produces:
>
> [e₁, -e₁, e₂, -x - 1]
>
>
> Is there a reason why this can't or shouldn't be done?
>
>
This was a bug in SymPy 0.7.1 and before. It's fixed in git version (see
http://github.com/sympy/sympy) and will be part of 0.7.2 release.


>  --
> 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/-/wX5ydFpohb8J.
> 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.
>

Mateusz

-- 
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