On 9/13/11 9:04 AM, Dima Pasechnik wrote:
I was just shown even better example of how bad this can get:
sage: m=matrix(RDF,[[1.24,0.2,2],[2.48,0.4,4],[3.72,0.6,1]])
sage: print m.rank()
3
sage: print m.transpose().rank()
2
it seems that a more robust way here would be to call the LU-decomposition,
which calls scipy (or/and numpy?),
so that PLU=A, P a permutation matrix, L a full-rank lower-triangular, and
U an upper-triangular. and check the rank of U.
sage: m.LU()[2].rank()
2
sage: m.transpose().LU()[2].rank()
2
See http://trac.sagemath.org/sage_trac/ticket/7392 for the ticket about
the rank function for RDF matrices. I think you contributed an example
on that ticket as well.
Thanks,
Jason
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org