Re: Help with problems with symbolic package
Markus Mützel <[email protected]>
| Newsgroups | gmane.comp.gnu.octave.general |
|---|---|
| Message-ID | <trinity-5a8a52d4-b6b8-405e-978b-ba25ca84ce7e-1604768695922@3c-app-gmx-bs01> |
Am 07. November 2020 um 17:56 Uhr schrieb [email protected]: > >> Hello, I recently installed Octave and I need to use the symbolic > >> package. > >> I downloaded it from the sourceforge of Octave, but I've had some > >> problems > >> when I started using it. I have installed Python 3.9 and the last > >> version of > >> the sympy module. > > > > I believe the current version of the symbolic package doesn't work > > correctly with the latest version of sympy. > > > > The next version of Octave for Windows will ship the symbolic package > > with the necessary dependencies. You could try the release candidate > > version 6.0.92 that you can download from here: > > https://alpha.gnu.org/gnu/octave/?C=M;O=D > > > > After installing it, just load the symbolic package with "pkg load > > symbolic". > > It worked but there are still problems with some functions: > > <--beggining of code--> > > >> pkg load symbolic > >> syms x real > Symbolic pkg v2.9.0: > /usr/lib/python3.8/site-packages/mpmath/ctx_mp_python.py:892: > SyntaxWarning: "is" with a literal. Did you mean "=="? > if other is 0: > /usr/lib/python3.8/site-packages/mpmath/ctx_mp_python.py:986: > SyntaxWarning: "is" with a literal. Did you mean "=="? > if other is 0: > /usr/lib/python3.8/site-packages/sympy/solvers/diophantine.py:3186: > SyntaxWarning: "is" with a literal. Did you mean "=="? > if feasible is 1: # it's prime and k == 2 > /usr/lib/python3.8/site-packages/sympy/plotting/plot.py:509: > SyntaxWarning: "is" with a literal. Did you mean "=="? > if self.xscale is 'log': > /usr/lib/python3.8/site-packages/sympy/plotting/plot.py:529: > SyntaxWarning: "is" with a literal. Did you mean "=="? > if self.xscale is 'log': > /usr/lib/python3.8/site-packages/sympy/plotting/plot.py:542: > SyntaxWarning: "is" with a literal. Did you mean "=="? > if self.xscale is 'log': > /usr/lib/python3.8/site-packages/sympy/plotting/plot.py:549: > SyntaxWarning: "is" with a literal. Did you mean "=="? > if self.xscale is 'log': > /usr/lib/python3.8/site-packages/mpmath/ctx_mp_python.py:892: > SyntaxWarning: "is" with a literal. Did you mean "=="? > if other is 0: > /usr/lib/python3.8/site-packages/mpmath/ctx_mp_python.py:986: > SyntaxWarning: "is" with a literal. Did you mean "=="? > if other is 0: > /usr/lib/python3.8/site-packages/sympy/solvers/diophantine.py:3186: > SyntaxWarning: "is" with a literal. Did you mean "=="? > if feasible is 1: # it's prime and k == 2 > /usr/lib/python3.8/site-packages/sympy/plotting/plot.py:509: > SyntaxWarning: "is" with a literal. Did you mean "=="? > if self.xscale is 'log': > /usr/lib/python3.8/site-packages/sympy/plotting/plot.py:529: > SyntaxWarning: "is" with a literal. Did you mean "=="? > if self.xscale is 'log': > /usr/lib/python3.8/site-packages/sympy/plotting/plot.py:542: > SyntaxWarning: "is" with a literal. Did you mean "=="? > if self.xscale is 'log': > /usr/lib/python3.8/site-packages/sympy/plotting/plot.py:549: > SyntaxWarning: "is" with a literal. Did you mean "=="? > if self.xscale is 'log': > Python communication link active, SymPy v1.4. > >> f(x)=x^2 > f(x) = (symfun) > > 2 > x > > >> fplot(f) > error: isalnum: not defined for class > error: called from > fplot at line 108 column 3 > >> fplot(f(x)) > error: isalnum: not defined for class > error: called from > fplot at line 108 column 3 > > <--end of code--> > > So, at least I can work with the real variable, but I have to plot > functions and so... Do you know how to solve this? And, about the > SyntaxWarning, AFAIK, in Python 'a is b' is like the identity > comparison... I think all the lines were it showed a warning would > return falsa, as long as and object just created for the comparison and > one stored as a variable are obviously not the same. But that might be a > Python problem. I will check on my own, but please tell me if you know > how to make the functions like 'fplot(symfun(syms))' work. > > However, thanks a million for solving my first problem! > > > Please, let the list know if that works for you. > > I will, but when it actually works. > > Happy hacking! > Darío Please, keep the mailing list in CC. Other people are probably more able to help you. Markus