In [1]: a = Plot(0)
In [2]: a
Out[2]: [0]: 0, 'mode=cartesian'
In [3]: type(a)
Out[3]: <class 'sympy.plotting.plot.Plot'>
Here, we see that the class is in sympy.plotting.plot. Unfortunately,
it is not the same as the Plot used above, which is just a function:
In [6]: type(Plot)
Out[6]: <type 'function'>
So we import it as a different name to avoid overriding the Plot function:
In [8]: from sympy.plotting.plot import Plot as PlotClass
In [9]: PlotClass
Out[9]: <class 'sympy.plotting.plot.Plot'>
In [11]: isinstance(a, PlotClass)
Out[11]: True
By the way, this error is misleading because there is a bare except
converting all errors into this one. See
https://github.com/sympy/sympy/pull/497.
Aaron Meurer
>
> Thanks.
>
Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/sympy/-/PM48NaNVcUIJ.
> To post to this group, send email to sy...@googlegroups.com.
> To unsubscribe from this group, send email to
> sympy+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/sympy?hl=en.
>