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
gh-40031: fix E228 in pyx in matrix
just adding spaces aroung modulo where missing
### 📝 Checklist
- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
URL: #40031
Reported by: Frédéric Chapoton
Reviewer(s): David Coudert
if tries > 1000*m: # avoid an insanely long infinite loop
@@ -5878,12 +5878,13 @@ cdef class Matrix(Matrix1):
5878
5878
return decomp_seq([(V, m==1)])
5879
5879
F.sort()
5880
5880
for g, m in f.factor():
5881
-
t = verbose('decomposition -- Computing g(self) for an irreducible factor g of degree %s'%g.degree(), level=2)
5881
+
t = verbose('decomposition -- Computing g(self) for an irreducible factor g of degree %s' % g.degree(), level=2)
5882
5882
if is_diagonalizable:
5883
5883
B = g(self)
5884
5884
else:
5885
5885
B = g(self)
5886
-
t2 = verbose('decomposition -- raising g(self) to the power %s'%m, level=2)
5886
+
t2 = verbose('decomposition -- raising g(self) to the power %s' % m,
5887
+
level=2)
5887
5888
B = B ** m
5888
5889
verbose('done powering', level=2, t=t2)
5889
5890
t = verbose('decomposition -- done computing g(self)', level=2, t=t)
@@ -5974,7 +5975,7 @@ cdef class Matrix(Matrix1):
5974
5975
if not self.is_square():
5975
5976
raise ArithmeticError("self must be a square matrix")
5976
5977
if M.base_ring() != self.base_ring():
5977
-
raise ArithmeticError("base rings must be the same, but self is over %s and module is over %s"%(
5978
+
raise ArithmeticError("base rings must be the same, but self is over %s and module is over %s" % (
5978
5979
self.base_ring(), M.base_ring()))
5979
5980
if M.degree() != self.ncols():
5980
5981
raise ArithmeticError("M must be a subspace of an %s-dimensional space" % self.ncols())
@@ -5991,7 +5992,7 @@ cdef class Matrix(Matrix1):
5991
5992
sum_dim = sum([A.dimension() for A, _ in D])
5992
5993
assert sum_dim == M.dimension(), \
5993
5994
"bug in decomposition; " + \
5994
-
"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)
5995
+
"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)
5995
5996
5996
5997
# 3. Lift decomposition to subspaces of ambient vector space.
5997
5998
# Each basis vector for an element of D defines a linear
@@ -8179,7 +8180,7 @@ cdef class Matrix(Matrix1):
8179
8180
try:
8180
8181
a, d, p = self._echelon_form_PID()
8181
8182
except TypeError as msg:
8182
-
raise NotImplementedError("%s\nechelon form over %s not yet implemented"%(msg, self.base_ring()))
8183
+
raise NotImplementedError("%s\nechelon form over %s not yet implemented" % (msg, self.base_ring()))
8183
8184
8184
8185
for c from 0 <= c < self.ncols():
8185
8186
for r from 0 <= r < self.nrows():
@@ -8383,7 +8384,7 @@ cdef class Matrix(Matrix1):
8383
8384
kwds['algorithm'] = algorithm
8384
8385
return self._echelonize_ring(**kwds)
8385
8386
except ArithmeticError as msg:
8386
-
raise NotImplementedError("%s\nEchelon form not implemented over '%s'."%(msg, basring))
8387
+
raise NotImplementedError("%s\nEchelon form not implemented over '%s'." % (msg, basring))
0 commit comments