Ticket #6442 (new defect)

Opened 9 months ago

Last modified 8 months ago

Random(?) index error with determinant method

Reported by: spancratz Owned by: somebody
Priority: major Milestone:
Component: linear algebra Keywords: det, determinant, IndexError
Cc: Author(s): Sebastian Pancratz
Report Upstream: Reviewer(s):
Merged in: Work issues:

Description

On some occasions, the call A.det() for a matrix A results in an error, namely:

IndexError?: list index out of range

The error occurs during the dictionary lookup. It seems that rather than finding no item (and hence creating a new one and then computing determinant), an empty item D is found and indexing into D results in the error.

If run into this strange problem twice during the SAGE Days 16. I've attached an example file to this email, which contains a saved matrix. The code

sage: A = load("DetBugMatrix?.sobj") sage: A.det()

should trigger the problem. If I recall correctly, I obtained the matrix from the following code

sage: R = Zp(p=5,prec=3,type="capped-abs",print_mode="series") sage: A = random_matrix(R, 10, 10)

Strangely enough (although perhaps not that strange after checking that the error happens during the lookup), the call A.copy().det() returns the determinant without any problems.

I have no clue as to how one could systematically reproduce the bug.

In case it may help, I downloaded SAGE 4.0.2 and built it locally. The machine used is a Lenovo T500 laptop with two intel centrino, running Ubuntu. If there's any further information that would help, please let me know.

Attachments

DetBugMatrix.sobj Download (2.3 KB) - added by spancratz 9 months ago.
Matrix to trigger the IndexError?

Change History

Changed 9 months ago by spancratz

Matrix to trigger the IndexError?

Changed 8 months ago by davidloeffler

  • component changed from algebra to linear algebra
Note: See TracTickets for help on using tickets.