On 8/19/11 4:25 PM, Nils Bruin wrote:
In analogy to (a,) being a singleton, this should probably be
[a,b,c,d;]

Interesting. In python, this is often stated as "the comma operator makes a tuple, not the parentheses". So we're saying that the semicolon is what makes a matrix. Interesting. So if there is no semicolon, it isn't a matrix.

Should we support spaces for element delimiters? That would be consistent with matlab, and I personally prefer [1 2; 3 4] over [1,2;3,4] (since the , and ; are too similar, so it takes a moment to determine which is an element and which is a row delimiter). If we support spaces, then it seems a little weird that [1 2 3] is not good syntax, but [1 2 3; ] is good syntax.

Also, I guess it is nice in matlab that you can do:

a=[

<paste in a table of numbers you copied from a web page

]

and get a nice matrix, since newlines count as row delimiters.

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

Reply via email to