-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deprecation warning using solve
: "non-Expr objects in a Matrix is deprecated"
#1310
Comments
Hi @cbm755 and @CarloWood, Regarding the deprecation warning for this issue, I ran the MATLAB example code with the following versions:
Here’s the code I executed: octave:1> pkg load symbolic
octave:2> version
ans = 9.2.0
octave:3> syms u v
Symbolic pkg v3.2.1: Python communication link active, SymPy v1.10.1.
octave:4> eqns = [2*u^2 v^2 == 0, u - v == 1];
octave:5> vars = [v u];
octave:6> [solv, solu] = solve(eqns,vars)
solv = (sym 2x1 matrix)
[ ___ ]
[1 \/ 2 *I]
[- -------]
[3 3 ]
[ ]
[ ___ ]
[1 \/ 2 *I]
[- - -------]
[3 3 ]
solu = (sym 2x1 matrix)
[ ___ ]
[ 2 \/ 2 *I]
[- - -------]
[ 3 3 ]
[ ]
[ ___ ]
[ 2 \/ 2 *I]
[- - - -------]
[ 3 3 ] Even after enabling all warnings with octave:7> warning('on', 'all')
octave:8> [solv, solu] = solve(eqns,vars)
warning: Using an object of size 3x1 as a boolean value implies all().
warning: called from
compare_versions at line 115 column 7
python_ipc_driver at line 36 column 9
pycall_sympy__ at line 164 column 11
solve at line 197 column 9
warning: Using an object of size 2x1 as a boolean value implies all().
warning: called from
compare_versions at line 119 column 7
python_ipc_driver at line 36 column 9
pycall_sympy__ at line 164 column 11
solve at line 197 column 9
warning: implicit conversion from string to real N-D array
warning: called from
compare_versions at line 159 column 8
python_ipc_driver at line 36 column 9
pycall_sympy__ at line 164 column 11
solve at line 197 column 9
warning: implicit conversion from string to real N-D array
warning: called from
compare_versions at line 159 column 8
python_ipc_driver at line 36 column 9
pycall_sympy__ at line 164 column 11
solve at line 197 column 9
warning: concatenation of different character string types may have unintended consequences
warning: called from
strjoin at line 84 column 10
write_lines at line 28 column 3
python_ipc_popen2 at line 145 column 3
python_ipc_driver at line 62 column 15
pycall_sympy__ at line 164 column 11
solve at line 197 column 9
warning: concatenation of different character string types may have unintended consequences
warning: called from
strjoin at line 84 column 10
write_lines at line 28 column 3
python_ipc_popen2 at line 180 column 3
python_ipc_driver at line 62 column 15
pycall_sympy__ at line 164 column 11
solve at line 197 column 9
warning: concatenation of different character string types may have unintended consequences
warning: called from
strjoin at line 84 column 10
write_lines at line 28 column 3
python_ipc_popen2 at line 182 column 3
python_ipc_driver at line 62 column 15
pycall_sympy__ at line 164 column 11
solve at line 197 column 9
solv = (sym 2x1 matrix)
[ ___ ]
[1 \/ 2 *I]
[- -------]
[3 3 ]
[ ]
[ ___ ]
[1 \/ 2 *I]
[- - -------]
[3 3 ]
solu = (sym 2x1 matrix)
[ ___ ]
[ 2 \/ 2 *I]
[- - -------]
[ 3 3 ]
[ ]
[ ___ ]
[ 2 \/ 2 *I]
[- - - -------]
[ 3 3 ] Next, I tested with the following versions:
Again, I ran the same code: octave:3> clear all;
octave:4> version
ans = 9.2.0
octave:5> pkg load symbolic
octave:6> syms u v
Symbolic pkg v3.2.1: Python communication link active, SymPy v1.13.3.
octave:7> eqns = [2*u^2 v^2 == 0, u - v == 1];
octave:8> vars = [v u];
octave:9> [solv, solu] = solve(eqns,vars)
solv = (sym 2x1 matrix)
[ ___ ]
[ 2 \/ 2 *I]
[- - - -------]
[ 3 3 ]
[ ]
[ ___ ]
[ 2 \/ 2 *I]
[- - -------]
[ 3 3 ]
solu = (sym 2x1 matrix)
[ ___ ]
[1 \/ 2 *I]
[- - -------]
[3 3 ]
[ ]
[ ___ ]
[1 \/ 2 *I]
[- -------]
[3 3 ] Again, no deprecation warnings appeared after enabling all warnings. Additional Note on Using
|
Hi @cbm755 , |
This looks like a different bug:
can you file a different issue about it? |
solve
.solve
: "non-Expr objects in a Matrix is deprecated"
@Sonu0305, maybe one issue to cover things about by The reason (I think) that this is unrelated to the Non-Expr warning is that the Non-Expr warning comes from Python (SymPy) but the Octave |
@cbm755 |
When trying the following MATLAB example code:
we get a deprecation warning, the output is:
If there is another way to solve a linear system without getting
the deprecation then I'd be happy too - but I can't find any.
The text was updated successfully, but these errors were encountered: