See also http://docs.sympy.org/gotchas.html#python-numbers-vs-sympy-numbers.
And the rest of the document should hopefully help you avoid other such difficulties. Aaron Meurer On Mar 18, 2010, at 3:52 PM, Vinzent Steinberg wrote: > On Mar 18, 9:46 pm, Ondrej Certik <[email protected]> wrote: >> The problem with Python is that 1/2 returns 0, so you need to use >> S(1)/2 to let Python know that S(1) is a SymPy integer and then all is >> fine. > > Importing division from __future__ could also help. > > Vinzent > > -- > 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. > -- 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.
