Eq in Sympy

77 views
Skip to first unread message

Rahul Padhy

unread,
Dec 31, 2015, 9:44:34 AM12/31/15
to sympy
I was going through the Sympy tutorial... Its given that Eq(x + 1, 4) gives the symbolic output as :
        
         x + 1 == 4

But when I run the given code snippet in my terminal or in the Sympy Live Shell, it gives me the output as :

        x + 1 = 4

Is this just a typo or a genuine error ?
Screenshot from 2015-12-31 16-52-43.png

Jason Moore

unread,
Dec 31, 2015, 10:15:25 AM12/31/15
to sy...@googlegroups.com
In SymPy 0.7.6.1 I'm getting:

Python 3.5.1 |Continuum Analytics, Inc.| (default, Dec  7 2015, 11:16:01)
Type "copyright", "credits" or "license" for more information.

IPython 4.0.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: from sympy import *

In [2]: from sympy.abc import x

In [3]: Eq(x+1, 4)
Out[3]: x + 1 == 4


Which is correct. What versions of SymPy are you using?

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/be634e6b-5904-4d65-a454-d28e99aa0aa6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aaron Meurer

unread,
Jan 1, 2016, 3:03:26 PM1/1/16
to sy...@googlegroups.com
I'm guessing this is a difference of printing. The SymPy Live shell
uses pretty printing, but the doctests are all written without pretty
printing enabled.

Aaron Meurer

Jason Moore

unread,
Jan 1, 2016, 4:58:14 PM1/1/16
to sy...@googlegroups.com
Yes, you are probably just seeing the LaTeX/MathJax rendering:

Inline image 1
Reply all
Reply to author
Forward
0 new messages