On Mar 15, 2010, at 3:13 PM, Robert Miller wrote:
Hello,
It seems that a certain sparse matrix over the Integers takes
"forever" to multiply by 1:
(this is in Sage-4.3.4.alpha1)
sage: z,M = load('http://sage.math.washington.edu/home/rlmill/bad_matrix.sobj')
Attempting to load remote file:
http://sage.math.washington.edu/home/rlmill/bad_matrix.sobj
Loading: [..................................................]
sage: z
1
sage: z.parent()
Integer Ring
sage: M
5376 x 16128 sparse matrix over Integer Ring (type 'print M.str()' to
see all of the entries)
sage: cm = sage.structure.element.get_coercion_model()
sage: cm.explain(z, M)
^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C
I can't even interrupt! Getting slices of the matrix works fine, but
things like M.density() also seem to hang (although I didn't wait very
long).
However, if I take a small slice, it works just fine:
sage: M = M[:10,:10]
sage: type(M)
<type 'sage.matrix.matrix_integer_sparse.Matrix_integer_sparse'>
sage: N = z*M
sage: cm.explain(z, M)
Action discovered.
Left scalar multiplication by Integer Ring on Full MatrixSpace of
10 by 10 sparse matrices over Integer Ring
Result lives in Full MatrixSpace of 10 by 10 sparse matrices over
Integer Ring
Full MatrixSpace of 10 by 10 sparse matrices over Integer Ring
What is going on!? Help!
Here's the problem:
sage: M.parent()
Full MatrixSpace of 5376 by 16128 dense matrices over Integer Ring
No idea how that happened...
- Robert
--
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org