On Jan 9, 2008 3:23 AM, Robert Bradshaw <[EMAIL PROTECTED]> wrote:
>
> http://sagetrac.org/sage_trac/ticket/1732

2 questions about the patch:
* Why is this function named block_sum? What are we summing?
* Why are we limited to 4 arguments? Ideally, I would love to pass a
list to this function and have it concatenate each matrix in the list
(horizontally in the following case):
A.block_matrix([A_1, A_2, ..., A_n])

You could pass the functions an argument, indicating the number of
rows (or columns) you want so that you can do things like
A =  [ A1 A2]
        [ A3 A4]

like this:
A=block_matrix([A1,A2,A3,A4],num_cols=2*3,num_rows=None). Here each A
is 3x3 and we are concatenating 2 of them in each row.

On a more general note, block_sum as of 2.9.3 is really constructing a
block diagonal matrix, isn't it? Why not call it block_diagonal? Of
course, for now, it's only using one argument, why not pass it a list
of matrices?

Thoughts?

didier

>
>
> On Jan 8, 2008, at 4:27 AM, vgermrk wrote:
>
> >
> > Is there a way to construct block matrices in SAGE?
> > Not just the "block_sum", "augment" and "stack" functions.
> >
> > As an example, let A, B, C, D be matrices and i want to construct a
> > matrix like E=[[A,B],[C,D]]
> >
> > Such a feature would be very nice.
> >
> > -vgermrk-
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to