From 43783fbb6e8292a67506f6df876ab1de6dab68b1 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 9 Mar 2021 01:23:48 -0500 Subject: [PATCH] matrix_algebra: put basis in the usual (row,column) order. --- mjo/hurwitz.py | 1 + mjo/matrix_algebra.py | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mjo/hurwitz.py b/mjo/hurwitz.py index 1f7c9dc..e280034 100644 --- a/mjo/hurwitz.py +++ b/mjo/hurwitz.py @@ -319,6 +319,7 @@ class HurwitzMatrixAlgebraElement(MatrixAlgebraElement): sage: A = HurwitzMatrixAlgebra(2, QQbar, ZZ) sage: M = A([ [ I, 2*I], ....: [ 3*I, 4*I] ]) + sage: M.conjugate_transpose() +------+------+ | -1*I | -3*I | +------+------+ diff --git a/mjo/matrix_algebra.py b/mjo/matrix_algebra.py index d67347b..84aa8d2 100644 --- a/mjo/matrix_algebra.py +++ b/mjo/matrix_algebra.py @@ -198,8 +198,6 @@ class MatrixAlgebra(CombinatorialFreeModule): # sticking a "1" in each position doesn't give us a basis for # the space. We actually need to stick each of e0, e1, ... (a # basis for the entry algebra itself) into each position. - I = range(n) - J = range(n) self._entry_algebra = entry_algebra # Needs to make the (overridden) method call when, for example, @@ -207,8 +205,8 @@ class MatrixAlgebra(CombinatorialFreeModule): # lies to us. entry_basis = self.entry_algebra_gens() - basis_indices = [(i,j,e) for i in range(n) - for j in range(n) + basis_indices = [(i,j,e) for j in range(n) + for i in range(n) for e in entry_basis] super().__init__(scalars, -- 2.43.2