sympy__sympy-18189
diophantine: incomplete results depending on syms order with permute=True
Verdict: the fix is stated in the issue (Tier A).
diff --git a/sympy/solvers/diophantine.py b/sympy/solvers/diophantine.py index 6092e35..b43f5c1 100644 --- a/sympy/solvers/diophantine.py +++ b/sympy/solvers/diophantine.py @@ -182,7 +182,7 @@ def diophantine(eq, param=symbols("t", integer=True), syms=None, if syms != var: dict_sym_index = dict(zip(syms, range(len(syms)))) return {tuple([t[dict_sym_index[i]] for i in var]) - for t in diophantine(eq, param)} + for t in diophantine(eq, param, permute=permute)} n, d = eq.as_numer_denom() if n.is_number: return set()
The text states the fix: “Based on a cursory glance at the code it seems that `permute=True` is lost when `diophantine` calls itself:”
All SWE-bench Verified tasks · more sympy/sympy tasks · How the check works