answered 8 years ago
This is one way.
sage: matrix(ZZ, 4, 4, lambda i, j: 10) [10 10 10 10] [10 10 10 10] [10 10 10 10] [10 10 10 10]