First time here? Check out the FAQ!
answered 2020-01-01 19:41:36 +0100
Thank you for the report. This is a bug with sparse matrices, which is now tracked at #28935.
As a workaround, you could use:
sage: diagonal_matrix([0], sparse=False).exp() [1]