You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if tries > 1000*m: # avoid an insanely long infinite loop
@@ -5842,12 +5842,13 @@ cdef class Matrix(Matrix1):
5842
5842
return decomp_seq([(V, m==1)])
5843
5843
F.sort()
5844
5844
for g, m in f.factor():
5845
-
t = verbose('decomposition -- Computing g(self) for an irreducible factor g of degree %s'%g.degree(), level=2)
5845
+
t = verbose('decomposition -- Computing g(self) for an irreducible factor g of degree %s' % g.degree(), level=2)
5846
5846
if is_diagonalizable:
5847
5847
B = g(self)
5848
5848
else:
5849
5849
B = g(self)
5850
-
t2 = verbose('decomposition -- raising g(self) to the power %s'%m, level=2)
5850
+
t2 = verbose('decomposition -- raising g(self) to the power %s' % m,
5851
+
level=2)
5851
5852
B = B ** m
5852
5853
verbose('done powering', level=2, t=t2)
5853
5854
t = verbose('decomposition -- done computing g(self)', level=2, t=t)
@@ -5938,7 +5939,7 @@ cdef class Matrix(Matrix1):
5938
5939
if not self.is_square():
5939
5940
raise ArithmeticError("self must be a square matrix")
5940
5941
if M.base_ring() != self.base_ring():
5941
-
raise ArithmeticError("base rings must be the same, but self is over %s and module is over %s"%(
5942
+
raise ArithmeticError("base rings must be the same, but self is over %s and module is over %s" % (
5942
5943
self.base_ring(), M.base_ring()))
5943
5944
if M.degree() != self.ncols():
5944
5945
raise ArithmeticError("M must be a subspace of an %s-dimensional space" % self.ncols())
@@ -5955,7 +5956,7 @@ cdef class Matrix(Matrix1):
5955
5956
sum_dim = sum([A.dimension() for A, _ in D])
5956
5957
assert sum_dim == M.dimension(), \
5957
5958
"bug in decomposition; " + \
5958
-
"the sum of the dimensions (=%s) of the factors must equal the dimension (%s) of the acted on space:\nFactors found: %s\nSpace: %s"%(sum_dim, M.dimension(), D, M)
5959
+
"the sum of the dimensions (=%s) of the factors must equal the dimension (%s) of the acted on space:\nFactors found: %s\nSpace: %s" % (sum_dim, M.dimension(), D, M)
5959
5960
5960
5961
# 3. Lift decomposition to subspaces of ambient vector space.
5961
5962
# Each basis vector for an element of D defines a linear
@@ -8143,7 +8144,7 @@ cdef class Matrix(Matrix1):
8143
8144
try:
8144
8145
a, d, p = self._echelon_form_PID()
8145
8146
except TypeError as msg:
8146
-
raise NotImplementedError("%s\nechelon form over %s not yet implemented"%(msg, self.base_ring()))
8147
+
raise NotImplementedError("%s\nechelon form over %s not yet implemented" % (msg, self.base_ring()))
8147
8148
8148
8149
for c from 0 <= c < self.ncols():
8149
8150
for r from 0 <= r < self.nrows():
@@ -8347,7 +8348,7 @@ cdef class Matrix(Matrix1):
8347
8348
kwds['algorithm'] = algorithm
8348
8349
return self._echelonize_ring(**kwds)
8349
8350
except ArithmeticError as msg:
8350
-
raise NotImplementedError("%s\nEchelon form not implemented over '%s'."%(msg, basring))
8351
+
raise NotImplementedError("%s\nEchelon form not implemented over '%s'." % (msg, basring))
0 commit comments