Skip to content

Commit

Permalink
apply black formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed Jul 8, 2024
1 parent 37635cc commit 5ac4606
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 deletions.
7 changes: 5 additions & 2 deletions darmonpoints/bianchi_lseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,11 @@ def get_Lseries_term(self, m, n):
dmn = 0

## Compute representatives for (O_F/p)*
residues = [alpha for alpha in F.ideal(p).residues()
if alpha.mod(P) != 0 and alpha.mod(Pbar) != 0]
residues = [
alpha
for alpha in F.ideal(p).residues()
if alpha.mod(P) != 0 and alpha.mod(Pbar) != 0
]

## Compute the coefficients c_j^(m)
if m == 0:
Expand Down
3 changes: 1 addition & 2 deletions darmonpoints/cohomology_arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1031,8 +1031,7 @@ def get_Up_reps_local(self, prec, pi, pi_bar):
emb1 = lambda x, prec: self.group().embed(conj(x), prec)

ans0 = [S0(emb0(g, prec), emb1(g, prec)) for g in Up_reps]
ans1 = [S0(emb0(gbar, prec), emb1(gbar, prec))
for gbar in Up_reps_bar]
ans1 = [S0(emb0(gbar, prec), emb1(gbar, prec)) for gbar in Up_reps_bar]
return ans0, ans1

def apply_Up1(self, c, group=None, scale=1, progress_bar=False): # bianchi
Expand Down
4 changes: 1 addition & 3 deletions darmonpoints/homology.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ def lattice_homology_cycle(
xi2 = H1({})
for x, a in xlist:
xi1 += H1({G(x.quaternion_rep): Div(tau)}).mult_by(a)
xi2 += H1({G(wp**-1 * x.quaternion_rep * wp): wpinv_mat * Div(tau)}).mult_by(
a
)
xi2 += H1({G(wp**-1 * x.quaternion_rep * wp): wpinv_mat * Div(tau)}).mult_by(a)
xi10 = xi1
xi20 = xi2
while True:
Expand Down
12 changes: 6 additions & 6 deletions darmonpoints/padicperiods.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,11 +914,12 @@ def build_Lambdalist_from_AB(A, B, T, scaling):
ans = []
K = A.parent()
for A0, B0 in product(
our_nroot(A, scaling, return_all=True),
our_nroot(B, scaling, return_all=True)
our_nroot(A, scaling, return_all=True), our_nroot(B, scaling, return_all=True)
):
ans.extend(Matrix(K, 2, 2, [A0, B0, B1**alpha, A0 * B1**beta])
for B1 in our_nroot(B0, d, return_all=True))
ans.extend(
Matrix(K, 2, 2, [A0, B0, B1**alpha, A0 * B1**beta])
for B1 in our_nroot(B0, d, return_all=True)
)
return ans


Expand Down Expand Up @@ -1789,8 +1790,7 @@ def generate_listI10(F, N):
for ell in F.primes_of_bounded_norm(5):
factor_list.append(ell.gens_reduced()[0])
exp_ranges.append(range_smallprimes)
return [prod([o**i for o, i in zip(factor_list, v)])
for v in product(*exp_ranges)]
return [prod([o**i for o, i in zip(factor_list, v)]) for v in product(*exp_ranges)]


def find_kadziela_matrices(M, T):
Expand Down
5 changes: 1 addition & 4 deletions darmonpoints/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1978,10 +1978,7 @@ def recognize_J(
pnum = E.torsion_order() * power.numerator()
pden = E.torsion_order() * power.denominator()
J1list = sum(
(
our_nroot(J**pnum * qE**i, pden, return_all=True)
for i in range(pden)
),
(our_nroot(J**pnum * qE**i, pden, return_all=True) for i in range(pden)),
[],
)
for J1 in J1list:
Expand Down

0 comments on commit 5ac4606

Please sign in to comment.