| 1 | initial version |
As you note, using mat[m:,:] can give the wrong size matrix. This is perhaps a bug.
sage: identity_matrix(RDF, 4)[4:,:].nrows()
0
sage: identity_matrix(RDF, 4)[4:,:].ncols()
0
If you use the submatrix method instead, you will get matrices of the correct size:
sage: identity_matrix(RDF, 4).submatrix(4,0,0,4).nrows()
0
sage: identity_matrix(RDF, 4).submatrix(4,0,0,4).ncols()
4
sage: identity_matrix(RDF, 4).submatrix(4,0,0,4) * vector([1,2,3,4])
()
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.