Ticket #12370 (closed enhancement: fixed)
Change is_singular to use rank instead of determinant
| Reported by: | jlopez | Owned by: | jason, was |
|---|---|---|---|
| Priority: | major | Milestone: | sage-5.0 |
| Component: | linear algebra | Keywords: | matrices is_singular |
| Cc: | Work issues: | ||
| Report Upstream: | N/A | Reviewers: | Keshav Kini |
| Authors: | Javier López Peña | Merged in: | sage-5.0.beta3 |
| Dependencies: | Stopgaps: |
Description
The matrix method is_singular for matrices currently returns
self.det() == 0
It would be faster to check for full rank instead.
Attachments
Change History
comment:1 Changed 16 months ago by jlopez
- Status changed from new to needs_review
Changed is_singular method to use rank instead of determinant, which is much faster for generic matrices (particularly over ZZ). Fixed also an inconsistency in the error raised by determinant for nonsquare matrices, as it returns different error messages over the rationals.
Change is fairly minimal, and tests pass on my machine (Mac OS 10.6.8). Ready for review.
Note: See
TracTickets for help on using
tickets.

