Skip to content

Commit

Permalink
src/sage/algebras/finite_dimensional_algebras/finite_dimensional_alge…
Browse files Browse the repository at this point in the history
…bra.py: Fix import, use matrix() instead of Matrix()
  • Loading branch information
Matthias Koeppe committed May 27, 2024
1 parent 95e6c8b commit ffe8071
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from sage.rings.integer_ring import ZZ

from sage.categories.magmatic_algebras import MagmaticAlgebras
from sage.matrix.constructor import Matrix, matrix
from sage.matrix.constructor import matrix
from sage.structure.element import Matrix
from sage.rings.ring import Algebra
from sage.structure.category_object import normalize_names
Expand Down Expand Up @@ -389,7 +389,7 @@ def left_table(self):
"""
B = self.table()
n = self.degree()
table = [Matrix([B[j][i] for j in range(n)]) for i in range(n)]
table = [matrix([B[j][i] for j in range(n)]) for i in range(n)]
for b in table:
b.set_immutable()
return tuple(table)
Expand Down Expand Up @@ -596,9 +596,9 @@ def is_unitary(self):
self._one = matrix(k, 1, n)
return True
B1 = reduce(lambda x, y: x.augment(y),
self._table, Matrix(k, n, 0))
self._table, matrix(k, n, 0))
B2 = reduce(lambda x, y: x.augment(y),
self.left_table(), Matrix(k, n, 0))
self.left_table(), matrix(k, n, 0))
# This is the vector obtained by concatenating the rows of the
# n times n identity matrix:
kone = k.one()
Expand Down Expand Up @@ -882,7 +882,7 @@ def primary_decomposition(self):
and (self._assume_associative or self.is_associative())):
raise TypeError("algebra must be unitary, commutative and associative")
# Start with the trivial decomposition of self.
components = [Matrix.identity(k, n)]
components = [matrix.identity(k, n)]
for b in self.table():
# Use the action of the basis element b to refine our
# decomposition of self.
Expand All @@ -903,7 +903,7 @@ def primary_decomposition(self):
components = components_new
quotients = []
for i in range(len(components)):
I = Matrix(k, 0, n)
I = matrix(k, 0, n)
for j,c in enumerate(components):
if j != i:
I = I.stack(c)
Expand Down

0 comments on commit ffe8071

Please sign in to comment.