answered 3 years ago
You can use the apply_map method :
apply_map
sage: v.apply_map(sign) (1, 0, -1) sage: m.apply_map(lambda x : x^2) [ 1 4] [ 9 16]