ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 01 Jan 2020 12:41:36 -0600Exponential function does not work for diagonal matriceshttp://ask.sagemath.org/question/49190/exponential-function-does-not-work-for-diagonal-matrices/ D = diagonal_matrix([0])
exp(D)Wed, 25 Dec 2019 14:27:47 -0600http://ask.sagemath.org/question/49190/exponential-function-does-not-work-for-diagonal-matrices/Answer by mwageringel for <p>D = diagonal_matrix([0])
exp(D)</p>
http://ask.sagemath.org/question/49190/exponential-function-does-not-work-for-diagonal-matrices/?answer=49312#post-id-49312Thank you for the report. This is a bug with sparse matrices, which is now tracked at [#28935](https://trac.sagemath.org/ticket/28935).
As a workaround, you could use:
sage: diagonal_matrix([0], sparse=False).exp()
[1]Wed, 01 Jan 2020 12:41:36 -0600http://ask.sagemath.org/question/49190/exponential-function-does-not-work-for-diagonal-matrices/?answer=49312#post-id-49312