Skip to content

Commit

Permalink
Better error printing; to_full_ring resets cached properties only if …
Browse files Browse the repository at this point in the history
…going from qring to ring
  • Loading branch information
GDeLaurentis committed Dec 13, 2023
1 parent b5fe2b3 commit 86835a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion syngular/ideal.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ def to_qring(self, other):
self.ring = qring

def to_full_ring(self):
self.delete_cached_properties()
if isinstance(self.ring, QuotientRing):
self.delete_cached_properties()
self.generators = (self.ring.ideal + self).generators
self.ring = self.ring.ideal.ring

Expand Down
2 changes: 1 addition & 1 deletion syngular/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def execute_singular_command(singular_command, timeout=syngular.TIMEOUT, verbose
if 'halt' in output:
raise TimeoutError(f"{timeout} s")
if 'error' in output and 'groebner base computations with inexact coefficients can not be trusted due to rounding errors' not in output:
raise SingularException(output)
raise SingularException(f"{output}\n\n\nError occured while executing:\n{singular_command}")
if ' ? `Q` is undefined' in output:
output = output.replace(" ? `Q` is undefined", "")
print("Singular Error: Q is undefined")
Expand Down

0 comments on commit 86835a5

Please sign in to comment.