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

Commit

Permalink
Force base ring to be a field, to prevent singular segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelmarco committed May 24, 2022
1 parent 31d3c84 commit ea82aa9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sage/groups/matrix_gps/finitely_generated.py
Expand Up @@ -776,6 +776,8 @@ def invariant_generators(self, ring=None):
from sage.modules.free_module_element import vector
if not ring:
F = self.base_ring()
if not F.is_field():
F = F.fraction_field()
n = self.matrix_space().nrows()
R = PolynomialRing(F, n, ['x{}'.format(i) for i in range(n)])
else:
Expand Down

0 comments on commit ea82aa9

Please sign in to comment.