Martin Albrecht wrote:
> On Wednesday 01 October 2008, Stephen Hartke wrote:

>> Is there an easy way to delete a row or column? The same questions apply for
>> matrices over the rationals. 
> 
> sage: A.matrix_from_rows([0,2])
> [76 36 72]
> [29 58 49]

You can also use notation that may be more familiar from numpy or matlab:

sage: A = random_matrix(GF(127),3,3)
sage: A

[61 25 55]
[ 3 14 91]
[91 12 72]

sage: A[0:2,:]
[61 25 55]
[ 3 14 91]

sage: A[0:2]
[61 25 55]
[ 3 14 91]

sage: A[:,[0,2]]
[61 55]
[ 3 91]
[91 72]

See A.__getitem__? for more details.

Jason


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@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-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to