Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
#34519 fix msolve interface
Browse files Browse the repository at this point in the history
msolve's output in "parameterization" mode has changed with v0.3.0(?),
and, as far as I understand, should now be stable.
  • Loading branch information
mezzarobba committed Sep 11, 2022
1 parent 08202bc commit 367b862
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/sage/rings/polynomial/msolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ def _variety(ideal, ring, proof):

# Interpret output

data = sage_eval(msolve_out.stdout[:-2])
try:
data = sage_eval(msolve_out.stdout[:-2])
except SyntaxError:
raise NotImplementedError(f"unsupported msolve output format: {data}")

dim = data[0]
if dim == -1:
Expand All @@ -176,10 +179,11 @@ def to_poly(p, upol=PolynomialRing(base, 't')):
assert len(p[1]) == p[0] + 1
return upol(p[1])

if len(data) != 3:
try:
[dim1, nvars, _, vars, _, [one, [elim, den, param]]] = data[1]
except (IndexError, ValueError):
raise NotImplementedError(
f"unsupported msolve output format: {data}")
[dim1, nvars, _, vars, _, [one, elim, den, param]] = data[1]
assert dim1.is_zero()
assert one.is_one()
assert len(vars) == nvars
Expand Down

0 comments on commit 367b862

Please sign in to comment.