# Exponential function does not work for diagonal matrices

D = diagonal_matrix([0]) exp(D)

Exponential function does not work for diagonal matrices

asked **
2019-12-25 14:27:47 -0500
**

Anonymous

D = diagonal_matrix([0]) exp(D)

add a comment

1

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]
```

Asked: **
2019-12-25 14:27:47 -0500
**

Seen: **45 times**

Last updated: **Jan 01**

Why can't I find exponential of a "complex256" matrix?

sage cannot get the simplest form on the limit expression with binomial and exponential operations

Why can 'matrix' not use cached functions?

Solving linear matrix equations

How to solve linear programming in matrix form?

Making a dictionary of matrices, and save the session

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.