Skip to content

Commit 11cba3d

Browse files
committed
fixed wrong changes
1 parent 7e7d52a commit 11cba3d

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

src/sage/coding/binary_code.pyx

+7-8
Original file line numberDiff line numberDiff line change
@@ -3370,8 +3370,8 @@ cdef class BinaryCodeClassifier:
33703370
# equal to its minimum element
33713371
v[k] = nu.new_first_smallest_nontrivial(k, W, self.Phi_size * k)
33723372
if not nu.sat_225(k): hh = k + 1
3373-
e[k] = 0 # see state 12 and 17
3374-
state = 2 # continue down the tree
3373+
e[k] = 0 # see state 12 and 17
3374+
state = 2 # continue down the tree
33753375

33763376
elif state == 5:
33773377
# same as state 3, but in the case where we haven't yet defined zeta
@@ -3381,8 +3381,7 @@ cdef class BinaryCodeClassifier:
33813381
zb__Lambda_rho[k] = Lambda[k]
33823382
state = 4
33833383

3384-
elif state == 6:
3385-
# at this stage, there is no reason to continue downward, so backtrack
3384+
elif state == 6: # at this stage, there is no reason to continue downward, so backtrack
33863385
j = k
33873386

33883387
# return to the longest ancestor nu[i] of nu that could have a
@@ -3473,7 +3472,7 @@ cdef class BinaryCodeClassifier:
34733472

34743473
state = 10
34753474

3476-
elif state == 9: # nu is a better guess at the canonical label than rho
3475+
elif state == 9: # nu is a better guess at the canonical label than rho
34773476
rho = PartitionStack(nu)
34783477
k_rho = k
34793478
qzb = 0
@@ -3483,7 +3482,7 @@ cdef class BinaryCodeClassifier:
34833482
zb__Lambda_rho[k+1] = -1
34843483
state = 6
34853484

3486-
elif state == 10: # we have an automorphism to process
3485+
elif state == 10: # we have an automorphism to process
34873486
# increment l
34883487
if l < self.L-1: l += 1
34893488
# store information about the automorphism to Omega and Phi
@@ -3504,8 +3503,8 @@ cdef class BinaryCodeClassifier:
35043503
Omega[ii] ^= (1<<j) # so cancel
35053504
j = col_gamma[j] # cellmates
35063505
i += 1
3507-
while i < ncols and not Omega[ii]&(1<<i): # find minimal element
3508-
i += 1 # of next cell
3506+
while i < ncols and not Omega[ii]&(1<<i): # find minimal element
3507+
i += 1 # of next cell
35093508
i = 0
35103509
jj = self.radix
35113510
while i < nwords:

src/sage/rings/finite_rings/integer_mod.pyx

+3-4
Original file line numberDiff line numberDiff line change
@@ -1586,15 +1586,14 @@ cdef class IntegerMod_abstract(FiniteRingElement):
15861586
if all:
15871587
return [K(s) for s in sign[:2]]
15881588
return K(sign[0])
1589-
if all:
1590-
modp = [mod(self, 8)]
1591-
modp = mod(self, 8)
1589+
modp = [mod(self, 8)] if all else mod(self, 8)
15921590
else:
15931591
sign = [1]
15941592
modp = self % p
15951593
self = self / K(R.teichmuller(modp))
15961594
modp = modp.nth_root(n, all=all, algorithm=algorithm)
1597-
# now self is congruent to 1 mod 4 or 1 mod p (for odd p), so the power series for p-adic log converges.
1595+
# now self is congruent to 1 mod 4 or 1 mod p (for odd p),
1596+
# so the power series for p-adic log converges.
15981597
# Hensel lifting is probably better, but this is easier at the moment.
15991598
plog = R(self).log()
16001599
nval = n.valuation(p)

0 commit comments

Comments
 (0)