#6936: [with patch, needs rebase] Implement generic testing from #6343 for
matrices
-------------------------------+--------------------------------------------
Reporter: jason | Owner: was
Type: defect | Status: new
Priority: major | Milestone: sage-4.1.2
Component: linear algebra | Keywords: TestSuite
Reviewer: Nicolas M. ThiƩry | Author: Jason Grout
Merged: |
-------------------------------+--------------------------------------------
Comment(by mvngu):
With `trac-6936-matrix-generic-doctesting-minpoly.patch`, I got a hunk
failure:
{{{
[mv...@sage sage-main]$ hg qimport http://trac.sagemath.org/sage_trac/raw-
attachment/ticket/6936/trac-6936-matrix-generic-doctesting-minpoly.patch
&& hg qpush
adding trac-6936-matrix-generic-doctesting-minpoly.patch to series file
applying trac-6936-matrix-generic-doctesting-minpoly.patch
patching file sage/matrix/matrix2.pyx
Hunk #2 FAILED at 1190
1 out of 2 hunks FAILED -- saving rejects to file
sage/matrix/matrix2.pyx.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
Errors during apply, please fix and refresh trac-6936-matrix-generic-
doctesting-minpoly.patch
}}}
The hunk in question is
{{{
[mv...@sage sage-main]$ cat sage/matrix/matrix2.pyx.rej
--- matrix2.pyx
+++ matrix2.pyx
@@ -1190,6 +1191,22 @@
return mp
+ def _test_minpoly(self, **options):
+ """
+ Checks that :meth:`minpoly` works.
+
+ EXAMPLES::
+
+ sage: a=matrix([[1,2],[3,4]])
+ sage: a._test_minpoly()
+
+ """
+ if self.nrows()==self.ncols():
+ tester = self._tester(**options)
+ # At least we'll check that the minimal polynomial kills the
+ # matrix.
+ tester.assert_(self.minpoly().subs(x=self).is_zero())
+
def charpoly(self, var='x', algorithm="hessenberg"):
r"""
Return the characteristic polynomial of self, as a polynomial
over
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6936#comment:9>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---