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

Commit

Permalink
only test minpoly for exact rings
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed May 19, 2022
1 parent 08701a4 commit ce364f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sage/matrix/matrix2.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2834,7 +2834,7 @@ cdef class Matrix(Matrix1):
sage: a = matrix([[1,2],[3,4]])
sage: a._test_minpoly()
"""
if self.nrows() == self.ncols():
if self.nrows() == self.ncols() and self.base_ring().is_exact():
tester = self._tester(**options)
# At least check that the minimal polynomial kills the matrix
tester.assertTrue(self.minpoly().subs(x=self).is_zero())
Expand Down

0 comments on commit ce364f7

Please sign in to comment.