Re: [sympy] Re: Absolute value removal

2015-07-10 Thread Alan Bromborsky
Thank you both of you for your solutions. On Thu, Jul 9, 2015 at 11:26 AM, AMiT Kumar dtu.a...@gmail.com wrote: On Thursday, July 9, 2015 at 8:53:45 PM UTC+5:30, Renato Coutinho wrote: Wouldn't it be better to use a = Abs(sin(w))/cos(w) + Abs(w) a.replace(Abs, Id) rather than deal with

[sympy] Re: Absolute value removal

2015-07-09 Thread AMiT Kumar
Hi brombo, The simplest thing, I can think of as of now: In [23]: a = (Abs(sin(w))/cos(w)) + Abs(w) In [24]: S(str(a).replace('Abs', '')) Out[24]: w + sin(w)/cos(w) *AMiT Kumar* On Thursday, July 9, 2015 at 5:57:15 PM UTC+5:30, brombo wrote: Is there a simple way of removing all absolute

Re: [sympy] Re: Absolute value removal

2015-07-09 Thread Renato Coutinho
Wouldn't it be better to use a = Abs(sin(w))/cos(w) + Abs(w) a.replace(Abs, Id) rather than deal with strings? Best, Renato On Thu, Jul 9, 2015 at 12:10 PM, AMiT Kumar dtu.a...@gmail.com wrote: Hi brombo, The simplest thing, I can think of as of now: In [23]: a = (Abs(sin(w))/cos(w)) +

Re: [sympy] Re: Absolute value removal

2015-07-09 Thread AMiT Kumar
On Thursday, July 9, 2015 at 8:53:45 PM UTC+5:30, Renato Coutinho wrote: Wouldn't it be better to use a = Abs(sin(w))/cos(w) + Abs(w) a.replace(Abs, Id) rather than deal with strings? Yes, that is certainly better, I couldn't recall this, earlier. Thanks! *AMiT Kumar* -- You