[sage-devel] Matrix exponentials of diagonal matrices.

2019-04-16 Thread Brian Fitzpatrick
The code sage: D = diagonal_matrix([1, 2, 3]) sage: exp(D) produces RuntimeError: maximum recursion depth exceeded while calling a Python object Is this a bug? The code sage: D = matrix(3, [1, 0, 0, 0, 2, 0, 0, 0, 3]) sage: exp(D) produces the expected result. -- You received this messag

[sage-devel] Re: Adding a "random jordanizable matrix" feature.

2019-03-25 Thread Brian Fitzpatrick
Just realized that my code for random_jordanizable has an error. The "zip" on line 11 should be "*zip". On Monday, March 25, 2019 at 3:26:29 PM UTC-4, Brian Fitzpatrick wrote: > > The 'algorithm' option to `random_matrix` is very useful for producing >

[sage-devel] Adding a "random jordanizable matrix" feature.

2019-03-25 Thread Brian Fitzpatrick
The 'algorithm' option to `random_matrix` is very useful for producing examples of matrices. The algorithm='diagonalizable' option allows one to generate a diagonalizable matrix with prescribed eigenvalues with given algebraic multiplicities. For instance, A = random_matrix(ZZ, 6, algorithm='d