plotting test failure on Sympy master

83 views
Skip to first unread message

j.gont...@gmail.com

unread,
Apr 26, 2015, 4:42:12 PM4/26/15
to sy...@googlegroups.com
Hi,

I ran test on the latest sympy fetched from github and the plot_implicit tests are failing, complaining that "Eq" is not defined. I am using Python 2.7, would any of you have an idea of the origin of the problem ?

Below is the error message I got when testing only the plotting module:

_________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________ sympy/plotting/tests/test_plot_implicit.py:test_matplotlib ___________________________________________________________
  File "/home/jerome/Documents/Atlanta/post-doc/Python/sympy_save/sympy/plotting/tests/test_plot_implicit.py", line 70, in test_matplotlib
    plot_and_save('test')
  File "/home/jerome/Documents/Atlanta/post-doc/Python/sympy_save/sympy/plotting/tests/test_plot_implicit.py", line 22, in plot_and_save
    plot_implicit(Eq(y, cos(x)), (x, -5, 5), (y, -2, 2)).save(tmp_file(name))
  File "sympy/plotting/plot_implicit.py", line 375, in plot_implicit
    p.show()
  File "sympy/plotting/plot.py", line 185, in show
    self._backend.show()
  File "sympy/plotting/plot.py", line 1018, in show
    self.process_series()
  File "sympy/plotting/plot.py", line 921, in process_series
    points = s.get_raster()
  File "sympy/plotting/plot_implicit.py", line 81, in get_raster
    temp = func(xinterval, yinterval)
  File "<string>", line 1, in <lambda>
NameError: global name 'Eq' is not defined

========================================================== tests finished: 35 passed, 1 exceptions, in 279.77 seconds ===========================================================
DO *NOT* COMMIT!

Joachim Durchholz

unread,
Apr 26, 2015, 5:31:47 PM4/26/15
to sy...@googlegroups.com
Am 26.04.2015 um 22:42 schrieb j.gont...@gmail.com:
> File "sympy/plotting/plot_implicit.py", line 81, in get_raster
> temp = func(xinterval, yinterval)
> File "<string>", line 1, in <lambda>
> NameError: global name 'Eq' is not defined

I can confirm that this error happens.
I had to `pip install matplotlib` to see it; I guess most developers
don't have matplotlib installed and didn't notice the breakage.

Which version of SymPy are you using?

j.gont...@gmail.com

unread,
Apr 26, 2015, 6:09:05 PM4/26/15
to sy...@googlegroups.com
Sympy version 0.7.6-git, up-to-date with the current master on github.

Joachim Durchholz

unread,
Apr 27, 2015, 5:18:20 AM4/27/15
to sy...@googlegroups.com
Am 27.04.2015 um 00:09 schrieb j.gont...@gmail.com:
> Sympy version 0.7.6-git, up-to-date with the current master on github.

Okay, so we're seeing the same failure as you do.
Note to maintainers: To reproduce the error, install matplotlib and run

bin/test plot_implicit

The plot_implicit makes use of experimental_lambdify. Looking at the
code, this looks indeed quite experimental, the Q&A section in
experimental_lambdify makes me cringe and want to rip it out and replace
it with something sane (as the last Q&A actually suggests).

@J.Gonthier: Do you actually use implicit plots? If no, I suggest
ignoring the test failure for now, on the assumption that implicit_plot
is essentially unimplemented.

j.gont...@gmail.com

unread,
Apr 27, 2015, 10:38:00 AM4/27/15
to sy...@googlegroups.com
@Joachim: Thank you very much for looking into it. I am not using implicit plot, I simply noticed the test failing while developing something else.

Thanks again!
Reply all
Reply to author
Forward
0 new messages