On Jan 10, 2008, at 11:19 AM, William Stein wrote: > On Jan 10, 2008 9:16 AM, Robert Bradshaw > <[EMAIL PROTECTED]> wrote: >> >> These sound like good suggestions, I'll re-implement the richer >> functionality. >> > > Quick question -- why does this even have to be another function? > Couldn't > we just expand the functionality of the matrix command, at least in > some > cases? That's how some other systems work. > > E.g., if A, B, C, D are all matrices of the same size, we could make > > matrix([[A,B], [C, D]]) > > (1) determine a ring that the base rings of A,B,C,D all map to, then > (2) make the block matrix as mentioned above. We would know to > do this because A,B,C,D are all of type MatrixElement and > MatrixElements > are not ring elements. (Issue: Square matrices could someday be > ring elements > but they aren't now.) > > For clarity we could have a disambuiguation, e.g., > matrix([..], block=True) > > Anyway, to implement this would mean implementing exactly what you > plan to do already with a block_matrix command, then just adding a > quick hook to matrix(...) when one would otherwise get an error.
See http://sagetrac.org/sage_trac/ticket/1732 for a more flexible block_matrix command. Hooking this up to matrix(...) is now http://sagetrac.org/sage_trac/ ticket/1755 - Robert --~--~---------~--~----~------------~-------~--~----~ 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/ -~----------~----~----~----~------~----~------~--~---