1 | initial version |
there is also apply_map:
sage: Z = random_matrix(ZZ, 5, x=1, y=10)
sage: Z.apply_map(lambda z : log(z))
[log(6) 0 log(6) log(2) log(8)]
[log(3) log(6) log(8) log(3) log(5)]
[log(6) log(9) log(5) log(4) log(6)]
[log(8) log(3) log(7) log(2) log(6)]
[ 0 0 log(4) log(7) log(8)]