Python's NumPy gives
$$\log{\Big( \begin{matrix} 1 & 0 \\ 0 & 1 \end{matrix} \Big)} = \Big( \begin{matrix} 0 & -\infty \\ -\infty & 0 \end{matrix} \Big)$$
and
$$\exp{\Big( \begin{matrix} 0 & 0 \\ 0 & 0\end{matrix} \Big)} = \Big( \begin{matrix} 1 & 1 \\ 1 & 1 \end{matrix} \Big)$$
Are these choices consistent and correct? Are there multiple choices/solutions for these operations on matrices?
The code is:
np.log([[1,0],[0,1]])
array([[ 0., -inf],
[-inf, 0.]])
np.exp([[0,0], [0,0]])
array([[ 1., 1.],
[ 1., 1.]])
NOTE: It is pointed out in comments below that NumPy is obviously doing element-wise operations, which are incorrect in this case. I should have been using expm and logm. I will close with answer below to this effect.
It is pointed out in comments above that NumPy exp and log are doing element-wise operations, which are unintended in this case. I should have been using expm and logm.