| 1 | initial version |
You can use the apply_map method :
sage: v.apply_map(sign)
(1, 0, -1)
sage: m.apply_map(lambda x : x^2)
[ 1 4]
[ 9 16]
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.