id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
11544 Viewing matrices of algebraic numbers can take a long time rbeezer jason was "The following code leads to about a one minute hang for me (reproducibly in a fresh session). Keshav Kini (via IRC) had the same experience.
{{{
sage: A = matrix(QQ, 4, 4, [1, 2, -2, 2, 1, 0, -1, -1, 0, -1, 1, 1, -1, 2, 1/2, 0])
sage: e = A.eigenvalues()[3]
sage: K = (A-e).kernel()
sage: P = K.basis_matrix()
sage: x = P.list()[3]
sage: remap = {}
sage: remap.has_key(x)
}}}
This behavior hangs the creation of a string version of a matrix. If you comment-out {{{sage/matrix/matrix0.pyx}}} at lines 1695-1696, the problem goes away. To see the effect, run the first four lines of the code above and then just print P, with and without the two lines mentioned.
I have a workaround in mind that may solve the problem in many cases. Root issue is at #11543.
'''Apply:'''
1. [attachment:trac_11544-avoid-hash-of-matrix-entries-v2.patch]
" defect closed major sage-4.7.2 linear algebra fixed sage-4.7.2.alpha3 Rob Beezer Martin Raum N/A