On Thu, Jan 26, 2012 at 6:21 PM, Tom Boothby <tomas.boot...@gmail.com> wrote:
> On Thu, Jan 26, 2012 at 5:15 PM, David Roe <r...@math.harvard.edu> wrote:
>>>> Another issue: do we allow [1..10; 10..20]?
>>>
>>> We probably shouldn't go to extra effort to support it.
>>>
>>>> I can't seem to construct
>>>> matrices with matrix entries (this is not absurd) -- but should the
>>>> preparser grok it? [[1..10; 10..20] ; [2..12; 14..24]]
>>>
>>> Yes, for sure. And [[1..10; 10..20].det() ; [2..12; 14..24].det()]
>>
>> I'm not quite clear how these are square matrices (or even how the
>> rows have the same length).  What does [1..10; 10..20] translate to?
>
> They aren't square... and worse, [1..10; 10..20] doesn't make sense
> since the top row has 9 entries whereas the bottom has 10.  We're
> being sloppy for the sake of conversation.  I tend to think that we
> should support ellipses, though I admit it's a corner case of limited
> utility.
>
> [0..2; 10..12] -> [[0,1,2],[10,11,12]]

As long as the two can be considered independently, I'm not against it
(we could even handle list comprehensions). E.g. The transformation
would be

    "[X]" -> "matrix([[" + "],[".join(X.split(";") + "]])"

with the necessary precautions taken to appropriately handle splitting.

-- 
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