1 | initial version |
You could also do something like:
sage: A=matrix(QQ,3,3,[3,-1,1,3,6,2,3,3,7]) sage: A.numpy().diagonal() array([3, 6, 7])
2 | No.2 Revision |
You could also do something like:
sage: A=matrix(QQ,3,3,[3,-1,1,3,6,2,3,3,7])
sage: A.numpy().diagonal()
array([3, 6,