gnu-octave / symbolic

A Symbolic Package for Octave using SymPy
https://octave.sourceforge.io/symbolic/
GNU General Public License v3.0
151 stars 36 forks source link

sympy 1.12 issues from assumptions, recent failures #1250

Closed cbm755 closed 1 year ago

cbm755 commented 1 year ago
test @sym/assume
Symbolic pkg v3.0.1+: Python communication link active, SymPy v1.12rc1.
***** test
 syms x
 x = assume(x, 'positive');
 a = assumptions(x);
 assert(strcmp(a, 'x: positive'))
 x = assume(x, 'even');
 a = assumptions(x);
 assert(strcmp(a, 'x: even'))
 x = assume(x, 'odd');
 a = assumptions(x);
 assert(strcmp(a, 'x: odd'))
!!!!! test failed
assert (strcmp (a, 'x: positive')) failed

I assume, but haven't checked, that this is related to https://github.com/sympy/sympy/pull/24895, merged recently in the lead up to 1.12

cbm755 commented 1 year ago

Old:

>> syms x positive
>> assumptions(x)
ans =
{
  [1,1] = x: positive
}

New:

>> syms x positive
>> assumptions(x)
ans =
{
  [1,1] = x: commutative, positive
}
cbm755 commented 1 year ago

Fixed by #1251