On 5/17/07, Nick Alexander <[EMAIL PROTECTED]> wrote:
> While I'm here, what's the good way to get a column slice?  Say the
> moral equivalent of matrix(...)[,:4], which gets the first four
> columns?

sage: m = random_matrix(QQ,4, 7); m
[  -2   -2   -1   -1   -1  1/2   -1]
[   0   -2    0    0    0    2  1/2]
[ 1/2    0   -2   -1 -1/2    2   -2]
[   0 -1/2  1/2   -2    0    1   -1]
sage: m.matrix_from_columns(range(4))
[  -2   -2   -1   -1]
[   0   -2    0    0]
[ 1/2    0   -2   -1]
[   0 -1/2  1/2   -2]

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