#2429: block_matrix command should be consistent with the syntax of the matrix
command
----------------------------+-----------------------------------------------
Reporter: jason | Owner: was
Type: enhancement | Status: new
Priority: major | Milestone: sage-3.2.1
Component: linear algebra | Resolution:
Keywords: |
----------------------------+-----------------------------------------------
Comment (by jbmohler):
As commented in the original patch, the command
{{{
sage: block_matrix([x1,x2,x3,x4])
}}}
"works" where "works" means that it makes a 2x2 matrix of submatrices.
While that was what I expected when I used the command, it is quite
ambiguous and I felt like I was on shaky ground while writing my own code
on top of it. I do not like the ambiguity of that.
Note that it is also inconsistent with the matrix command:
{{{
sage: matrix([1,2,3,4])
[1 2 3 4]
}}}
which makes a 1x4 matrix.
I'd say they should both make an 1xn matrix (or matrix of submatrices).
Indeed, I'd almost rather that the syntax with a simple list and no
explicit dimensions be banned outright when we don't know the dimensions
from some parent object due to ambiguity. Seems to go along with
"Explicit is better than implicit."
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/2429#comment:1>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---