| 1 | initial version |
Alternative : the apply_map method :
sage: M=matrix([u/13 for u in range(9)], ncols=3) ; M
[ 0 1/13 2/13]
[3/13 4/13 5/13]
[6/13 7/13 8/13]
sage: M.apply_map(lambda u:round(u,2))
[ 0.0 0.08 0.15]
[0.23 0.31 0.38]
[0.46 0.54 0.62]
HTH,
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.