answered 1 year ago
Mapping the function to the matrix can be useful:
A = matrix([[0.1,0.2],[0.3,0.4]]) matsin(x)=sin(x) matlog(x)=log(x) print(A.apply_map(matsin)) print(A.apply_map(matlog))