Ondrej Certik | 6 Dec 2010 09:40
Picon
Gravatar

Re: Regarding expression

Hi premkiran,

On Mon, Dec 6, 2010 at 12:32 AM, premkiran <premiitm123@...> wrote:
> Is there a way to convert string expression to Numeric expression so
> that that can be put into simplify method.As otherwise ,the error is
>     if expr.is_Pow:
> AttributeError: 'str' object has no attribute 'is_Pow'

Can you post the whole session?

Normally, you would do:

In [1]: a = sympify("2/3")

In [2]: a
Out[2]: 2/3

Ondrej

--

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

prem kiran | 6 Dec 2010 09:58
Picon

Re: Regarding expression

CHECK THE ABOVE FILES

On Mon, Dec 6, 2010 at 2:10 PM, Ondrej Certik <ondrej-qoWwgFDjEAKlVyrhU4qvOw@public.gmane.org> wrote:
Hi premkiran,

On Mon, Dec 6, 2010 at 12:32 AM, premkiran <premiitm123-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Is there a way to convert string expression to Numeric expression so
> that that can be put into simplify method.As otherwise ,the error is
>     if expr.is_Pow:
> AttributeError: 'str' object has no attribute 'is_Pow'

Can you post the whole session?

Normally, you would do:


In [1]: a = sympify("2/3")

In [2]: a
Out[2]: 2/3


Ondrej

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




--
PREM KIRAN
2nd YEAR
DEPARTMENT OF MECHANICAL ENGINEERING
IIT MADRAS
CHENNAI

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to sympy+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
premkiran | 6 Dec 2010 10:02
Picon

Re: Regarding expression

THE ABOVE THING IS NOT WORKING IS SHOWING THE SAME ERROR
PS:CHANGE "SIMPIFY" TO "SIMPLIFY" AND TRY

On Dec 6, 1:40 pm, Ondrej Certik <ond...@...> wrote:
> Hi premkiran,
>
> On Mon, Dec 6, 2010 at 12:32 AM, premkiran <premiitm...@...> wrote:
> > Is there a way to convert string expression to Numeric expression so
> > that that can be put into simplify method.As otherwise ,the error is
> >     if expr.is_Pow:
> > AttributeError: 'str' object has no attribute 'is_Pow'
>
> Can you post the whole session?
>
> Normally, you would do:
>
> In [1]: a = sympify("2/3")
>
> In [2]: a
> Out[2]: 2/3
>
> Ondrej

--

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


Gmane