#4492: block_matrix reacts inconsistently with 0
------------------------------+---------------------------------------------
Reporter: jbmohler | Owner: was
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.3.2
Component: linear algebra | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Comment(by wjp):
I tried to write a patch for this, but ran into some trouble with the last
doctest:
{{{
sage: B = matrix(QQ, 2, 3, range(6))
sage: block_matrix([~A, B, B, ~A], subdivide=False)
[-5/12 3/8 0 1 2]
[ 1/4 -1/8 3 4 5]
[ 0 1 2 -5/12 3/8]
[ 3 4 5 1/4 -1/8]
}}}
In this case there are no real columns as such, and I'm not sure how we
should behave if there were an extra row with {{{'1 0'}}} below the {{{'~A
B'}}} and {{{'B ~A'}}} rows. Should that give a 3x3 identity matrix and a
3x2 zero matrix, or a 2x2 identity matrix and a 2x2 identity matrix? Maybe
undefined behaviour, or an exception?
My current attempt raises an exception for this doctest that the column
widths are inconsistent.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4492#comment:11>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.