Skip to content

Commit ed8e719

Browse files
Created tests covering the changes
Created tests covering the changes and checking whether the trac:`36838` is fixed or not.
1 parent f085c94 commit ed8e719

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/sage/matrix/matrix2.pyx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18618,6 +18618,18 @@ def _matrix_power_symbolic(A, n):
1861818618
-1/2*I*(a + I*b)^k + 1/2*I*(a - I*b)^k,
1861918619
1/2*I*(a + I*b)^k - 1/2*I*(a - I*b)^k,
1862018620
1/2*(a + I*b)^k + 1/2*(a - I*b)^k]
18621+
18622+
Check if :trac:`36838` is fixed:Checking symbolic power of
18623+
nilpotent matrix::
18624+
18625+
sage: A = matrix([[0,1],[0,0]]); A
18626+
[0 1]
18627+
[0 0]
18628+
sage: n = var('n'); n
18629+
n
18630+
sage: An = A^n; An
18631+
[ 0^n 0^(n - 1)*n]
18632+
[ 0 0^n]
1862118633
"""
1862218634
from sage.rings.qqbar import AlgebraicNumber
1862318635
from sage.matrix.constructor import matrix

0 commit comments

Comments
 (0)