That could be also done as

from numpy import fromfunction

matrix(fromfunction(lambda i,j:i-j, (6,6), dtype=int))

[ 0 -1 -2 -3 -4 -5]
[ 1  0 -1 -2 -3 -4]
[ 2  1  0 -1 -2 -3]
[ 3  2  1  0 -1 -2]
[ 4  3  2  1  0 -1]
[ 5  4  3  2  1  0]

_.parent()

Full MatrixSpace of 6 by 6 dense matrices over Integer Ring

Alec Mihailovs


-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to