]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: simplify two random statements.
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 9 Dec 2020 02:04:00 +0000 (21:04 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 9 Dec 2020 02:04:00 +0000 (21:04 -0500)
mjo/eja/eja_algebra.py

index 5910221ef8f8807dce7fee30eeb2da9045114399..5deb5c9488431b56678b7b2346eba5681955f92d 100644 (file)
@@ -1721,9 +1721,10 @@ class ComplexMatrixEJA(MatrixEJA):
 
         blocks = []
         for z in M.list():
-            a = z.list()[0] # real part, I guess
-            b = z.list()[1] # imag part, I guess
-            blocks.append(matrix(field, 2, [[a,b],[-b,a]]))
+            a = z.real()
+            b = z.imag()
+            blocks.append(matrix(field, 2, [ [ a, b],
+                                             [-b, a] ]))
 
         return matrix.block(field, n, blocks)