Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pep8 cleanup in modular/btquotients and modular/modsym #35918

Merged
merged 2 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/sage/modular/btquotients/btquotient.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
from sage.modular.arithgroup.all import Gamma0
from sage.modular.arithgroup.congroup_gammaH import GammaH_constructor
from sage.modular.dirichlet import DirichletGroup
lazy_import("sage.plot.colors", "rainbow")
from sage.quadratic_forms.quadratic_form import QuadraticForm
from sage.rings.finite_rings.finite_field_constructor import GF
from sage.rings.finite_rings.integer_mod_ring import Zmod
Expand All @@ -69,6 +68,7 @@
from sage.rings.rational_field import QQ
from sage.structure.sage_object import SageObject
from sage.structure.unique_representation import UniqueRepresentation
lazy_import("sage.plot.colors", "rainbow")


class DoubleCosetReduction(SageObject):
Expand Down Expand Up @@ -1435,7 +1435,8 @@ def __classcall__(cls, p, Nminus, Nplus=1, character=None,
True
"""
return super().__classcall__(cls, p, Nminus, Nplus,
character, use_magma, seed, magma_session)
character, use_magma,
seed, magma_session)

def __init__(self, p, Nminus, Nplus=1, character=None,
use_magma=False, seed=None, magma_session=None):
Expand Down
31 changes: 16 additions & 15 deletions src/sage/modular/btquotients/pautomorphicform.py
Original file line number Diff line number Diff line change
Expand Up @@ -1913,16 +1913,14 @@ def integrate(self, f, center=1, level=0, method='moments'):
if method == 'riemann_sum':
for e in E:
ii += 1
#print(ii,"/",len(E))
exp = ((R1([e[1, 1], e[1, 0]])) ** (self.parent()._U.weight()) * e.determinant() ** (-(self.parent()._U.weight()) / 2)) * f(R1([e[0, 1], e[0, 0]]) / R1([e[1, 1], e[1, 0]]))
#exp = R2([tmp[jj] for jj in range(self.parent()._k-1)])
# exp = R2([tmp[jj] for jj in range(self.parent()._k-1)])
new = eval_dist_at_powseries(self.evaluate(e), exp.truncate(self.parent()._U.weight() + 1))
value += new
elif method == 'moments':
n = self.parent()._U.weight()
for e in E:
ii += 1
#print(ii,"/",len(E))
a, b, c, d = e.list()
delta = e.determinant()
verbose('%s' % (R2([e[0, 1], e[0, 0]])
Expand Down Expand Up @@ -2272,7 +2270,7 @@ def __init__(self, domain, U, prec=None, t=None, R=None,
self._R = Qp(domain._p, prec)
else:
self._R = R
#U is a CoefficientModuleSpace
# U is a CoefficientModuleSpace
if isinstance(U, Integer):
if t is None:
if overconvergent:
Expand All @@ -2281,11 +2279,11 @@ def __init__(self, domain, U, prec=None, t=None, R=None,
t = 0
if overconvergent:
self._U = OverconvergentDistributions(U - 2, base=self._R,
prec_cap=U - 1 + t,
act_on_left=True,
adjuster=_btquot_adjuster(),
dettwist=-ZZ((U - 2) // 2),
act_padic=True)
prec_cap=U - 1 + t,
act_on_left=True,
adjuster=_btquot_adjuster(),
dettwist=-ZZ((U - 2) // 2),
act_padic=True)
else:
self._U = Symk(U - 2, base=self._R, act_on_left=True,
adjuster=_btquot_adjuster(),
Expand Down Expand Up @@ -2485,13 +2483,14 @@ def _element_constructor_(self, data):
F = []
Uold = data.parent()._U
for ii in range(len(data._F)):
newtmp = data.parent()._Sigma0(E[ii].rep.inverse(), check=False) * Uold(data._F[ii],normalize=False)
newtmp = data.parent()._Sigma0(E[ii].rep.inverse(), check=False) * Uold(data._F[ii],
normalize=False)
tmp.append(newtmp)
F.append(newtmp)
A = data.parent()._Sigma0(Matrix(QQ,2,2,[0,1/self.prime(),1,0]),check=False)
A = data.parent()._Sigma0(Matrix(QQ, 2, 2, [0, ~self.prime(), 1, 0]), check=False)
for ii in range(len(data._F)):
F.append(-(A * tmp[ii]))
vals = self._make_invariant([self._U(o,normalize=False) for o in F])
vals = self._make_invariant([self._U(o, normalize=False) for o in F])
return self.element_class(self, vals)
if data == 0:
return self.zero()
Expand Down Expand Up @@ -2605,11 +2604,12 @@ def _make_invariant(self, F):
m = M[ii]
for v in Si:
s += 1
g = self._Sigma0(m.adjugate() * self._source.embed_quaternion(v[0], prec=self._prec).adjugate() * m,check=False)
g = self._Sigma0(m.adjugate() * self._source.embed_quaternion(v[0], prec=self._prec).adjugate() * m,
check=False)
newFi += g * x
newF.append((QQ(1) / s) * newFi)
else:
newF.append(self._U(x,normalize=False))
newF.append(self._U(x, normalize=False))
return newF

def _apply_Up_operator(self, f, scale=False, original_moments=None):
Expand Down Expand Up @@ -2650,7 +2650,8 @@ def _apply_Up_operator(self, f, scale=False, original_moments=None):
for gg, edge_list in HeckeData:
u = edge_list[jj]
tprec = 2 * (prec_cap + u.power) + 1
r = S0(self._p ** -u.power * (u.t(tprec) * gg).adjugate(),check=False)
r = S0(self._p ** -u.power * (u.t(tprec) * gg).adjugate(),
check=False)
tmp += r * f._value[u.label]
tmp *= factor
for ii in range(self._n + 1):
Expand Down
Loading