|   | 1 |  initial version  | 
Well, you should perhaps tell what you would expect... Let me suggest two workarounds:
use a Python function instead:
sage: M = lambda x : matrix(2, 2, [x,x,x,x])
sage: M(3)
[3 3]
[3 3]
if you want to consider your matrix as a symbolic object:
sage: var('x'); M = matrix(2, 2, [x,x,x,x])
x
sage: M
[x x]
[x x]
sage: M.substitute(x=3)
[3 3]
[3 3]
|   | 2 |  No.2 Revision  | 
Well, you should perhaps tell what you would expect... Let me suggest two workarounds:possibilities:
use a Python function instead:function:
sage: M = lambda x : matrix(2, 2, [x,x,x,x])
sage: M(3)
[3 3]
[3 3]
if you want to consider your matrix as a symbolic object:
sage: var('x'); M = matrix(2, 2, [x,x,x,x])
x
sage: M
[x x]
[x x]
sage: M.substitute(x=3)
[3 3]
[3 3]
 Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.