Status: New
Owner: ----
Labels: Type-Defect Priority-Low

New issue 3591 by [email protected]: 'no ordering relation is defined for complex numbers' raised when plotting function involving Max(..)
http://code.google.com/p/sympy/issues/detail?id=3591

doing the following:

    from sympy import *
    x = Symbol('x', real = True)
    plot(Max(x,5), (x,0,10))

raises the following exception:

    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/plotting/plot.py", line 1165, in plot
        plots.show()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/plotting/plot.py", line 193, in show
        self._backend.show()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/plotting/plot.py", line 946, in show
        self.process_series()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/plotting/plot.py", line 838, in process_series
        collection = LineCollection(s.get_segments())
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/plotting/plot.py", line 461, in get_segments
        f_start = f(self.start)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sympy/plotting/experimental_lambdify.py", line 204, in __call__
        result = self.lambda_func(args)
      File "<string>", line 1, in <lambda>
    TypeError: no ordering relation is defined for complex numbers


while the following works:

    plot(re(Max(x,5)), (x,0,10))

See also https://groups.google.com/d/topic/sympy/nmOUXi4qNao/discussion .

(the platform is OSX 10.7.5, python 2.7.3, sympy 0.7.2)


--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" 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-issues?hl=en.

Reply via email to