Skip to content
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
6 changes: 3 additions & 3 deletions src/sage/misc/test_nested_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(self):
<sage.misc.test_nested_class.TestParent1_with_category object at ...>
"""
from sage.categories.sets_cat import Sets
Parent.__init__(self, category = Sets())
Parent.__init__(self, category=Sets())

class Element(ElementWrapper):
pass
Expand All @@ -80,7 +80,7 @@ def __init__(self):
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
"""
from sage.categories.sets_cat import Sets
Parent.__init__(self, category = Sets())
Parent.__init__(self, category=Sets())

class Element(ElementWrapper):
pass
Expand All @@ -96,7 +96,7 @@ def __init__(self):
<sage.misc.test_nested_class.TestParent3_with_category object at ...>
"""
from sage.categories.sets_cat import Sets
Parent.__init__(self, category = Sets())
Parent.__init__(self, category=Sets())

class Element(ElementWrapper):
pass
Expand Down
4 changes: 2 additions & 2 deletions src/sage/modular/btquotients/pautomorphicform.py
Original file line number Diff line number Diff line change
Expand Up @@ -1905,7 +1905,7 @@ def integrate(self, f, center=1, level=0, method='moments'):
- Marc Masdeu (2012-02-20)
"""
E = self.parent()._source._BT.get_balls(center, level)
R1 = LaurentSeriesRing(f.base_ring(), 'r1', default_prec = self.parent()._U.base_ring().precision_cap() + 1)
R1 = LaurentSeriesRing(f.base_ring(), 'r1', default_prec=self.parent()._U.base_ring().precision_cap() + 1)
R2 = PolynomialRing(f.base_ring(), 'x')
x = R2.gen()
value = 0
Expand Down Expand Up @@ -2605,7 +2605,7 @@ 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:
Expand Down
14 changes: 7 additions & 7 deletions src/sage/modular/modform_hecketriangle/abstract_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def _an_element_(self):

return self(self.Delta())

def default_prec(self, prec = None):
def default_prec(self, prec=None):
r"""
Set the default precision ``prec`` for the Fourier expansion.
If ``prec=None`` (default) then the current default precision is returned instead.
Expand Down Expand Up @@ -295,7 +295,7 @@ def default_prec(self, prec = None):
else:
return self._prec

def disp_prec(self, prec = None):
def disp_prec(self, prec=None):
r"""
Set the maximal display precision to ``prec``.
If ``prec="max"`` the precision is set to the default precision.
Expand Down Expand Up @@ -646,7 +646,7 @@ def rat_field(self):

return self._rat_field

def get_d(self, fix_d = False, d_num_prec = None):
def get_d(self, fix_d=False, d_num_prec=None):
r"""
Return the parameter ``d`` of self either as a formal
parameter or as a numerical approximation with the specified
Expand Down Expand Up @@ -715,7 +715,7 @@ def get_d(self, fix_d = False, d_num_prec = None):

return d

def get_q(self, prec = None, fix_d = False, d_num_prec = None):
def get_q(self, prec=None, fix_d=False, d_num_prec=None):
r"""
Return the generator of the power series of the Fourier expansion of ``self``.

Expand Down Expand Up @@ -766,7 +766,7 @@ def get_q(self, prec = None, fix_d = False, d_num_prec = None):
prec = self.default_prec()

base_ring = d.parent()
return PowerSeriesRing(FractionField(base_ring), 'q', default_prec = prec).gen()
return PowerSeriesRing(FractionField(base_ring), 'q', default_prec=prec).gen()

@cached_method
def diff_alg(self):
Expand Down Expand Up @@ -1039,7 +1039,7 @@ def homogeneous_part(self, k, ep):
QuasiMeromorphicModularForms(n=7, k=2, ep=-1) over Integer Ring
"""

return self.reduce_type(degree = (k,ep))
return self.reduce_type(degree=(k,ep))

@cached_method
def J_inv(self):
Expand Down Expand Up @@ -1944,7 +1944,7 @@ def EisensteinSeries(self, k=None):
ep = (-ZZ(1))**(k/2)
extended_self = self.extend_type(["holo"], ring=True)
# reduced_self is a classical ModularForms space
reduced_self = extended_self.reduce_type(["holo"], degree = (QQ(k), ep))
reduced_self = extended_self.reduce_type(["holo"], degree=(QQ(k), ep))

if (n == infinity):
l2 = ZZ(0)
Expand Down
10 changes: 5 additions & 5 deletions src/sage/modular/modform_hecketriangle/abstract_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ def F_simple(self, order_1=ZZ(0)):

return new_space(rat)

def Faber_pol(self, m, order_1=ZZ(0), fix_d = False, d_num_prec = None):
def Faber_pol(self, m, order_1=ZZ(0), fix_d=False, d_num_prec=None):
r"""
Return the ``m``'th Faber polynomial of ``self``.

Expand Down Expand Up @@ -985,7 +985,7 @@ def Faber_pol(self, m, order_1=ZZ(0), fix_d = False, d_num_prec = None):
return fab_pol.polynomial()

# very similar to Faber_pol: faber_pol(q)=Faber_pol(d*q)
def faber_pol(self, m, order_1=ZZ(0), fix_d = False, d_num_prec = None):
def faber_pol(self, m, order_1=ZZ(0), fix_d=False, d_num_prec=None):
r"""
If ``n=infinity`` a non-trivial order of ``-1`` can be specified through the
parameter ``order_1`` (default: 0). Otherwise it is ignored.
Expand Down Expand Up @@ -2042,7 +2042,7 @@ def construct_quasi_form(self, laurent_series, order_1=ZZ(0), check=True, ration

el = self(sum([b[k]*basis[k] for k in range(0, len(basis))]))
else:
A = self._quasi_form_matrix(min_exp = min_exp, order_1=order_1)
A = self._quasi_form_matrix(min_exp=min_exp, order_1=order_1)
row_size = A.dimensions()[0]

if (prec < min_exp + row_size):
Expand Down Expand Up @@ -2164,7 +2164,7 @@ def q_basis(self, m=None, min_exp=0, order_1=ZZ(0)):
if (m >= row_len + min_exp):
raise ValueError("Index out of range: m={} >= {}=required_precision + min_exp".format(m, row_len + min_exp))

A = self._quasi_form_matrix(min_exp = min_exp, order_1=order_1)
A = self._quasi_form_matrix(min_exp=min_exp, order_1=order_1)
b = vector(self.coeff_ring(), row_len)
b[m - min_exp] = 1
try:
Expand All @@ -2180,7 +2180,7 @@ def q_basis(self, m=None, min_exp=0, order_1=ZZ(0)):

return el

def rationalize_series(self, laurent_series, coeff_bound = 1e-10, denom_factor = ZZ(1)):
def rationalize_series(self, laurent_series, coeff_bound=1e-10, denom_factor=ZZ(1)):
r"""
Try to return a Laurent series with coefficients in ``self.coeff_ring()``
that matches the given Laurent series.
Expand Down
16 changes: 8 additions & 8 deletions src/sage/modular/modform_hecketriangle/graded_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class QuasiMeromorphicModularFormsRing(FormsRing_abstract, CommutativeAlgebra, U
"""

@staticmethod
def __classcall__(cls, group = HeckeTriangleGroup(3), base_ring = ZZ, red_hom = False, n=None):
def __classcall__(cls, group=HeckeTriangleGroup(3), base_ring=ZZ, red_hom=False, n=None):
r"""
Return a (cached) instance with canonical parameters.

Expand Down Expand Up @@ -126,7 +126,7 @@ class QuasiWeakModularFormsRing(FormsRing_abstract, CommutativeAlgebra, UniqueRe
"""

@staticmethod
def __classcall__(cls, group = HeckeTriangleGroup(3), base_ring = ZZ, red_hom = False, n=None):
def __classcall__(cls, group=HeckeTriangleGroup(3), base_ring=ZZ, red_hom=False, n=None):
r"""
Return a (cached) instance with canonical parameters.

Expand Down Expand Up @@ -185,7 +185,7 @@ class QuasiModularFormsRing(FormsRing_abstract, CommutativeAlgebra, UniqueRepres
"""

@staticmethod
def __classcall__(cls, group = HeckeTriangleGroup(3), base_ring = ZZ, red_hom = False, n=None):
def __classcall__(cls, group=HeckeTriangleGroup(3), base_ring=ZZ, red_hom=False, n=None):
r"""
Return a (cached) instance with canonical parameters.

Expand Down Expand Up @@ -244,7 +244,7 @@ class QuasiCuspFormsRing(FormsRing_abstract, CommutativeAlgebra, UniqueRepresent
"""

@staticmethod
def __classcall__(cls, group = HeckeTriangleGroup(3), base_ring = ZZ, red_hom = False, n=None):
def __classcall__(cls, group=HeckeTriangleGroup(3), base_ring=ZZ, red_hom=False, n=None):
r"""
Return a (cached) instance with canonical parameters.

Expand Down Expand Up @@ -303,7 +303,7 @@ class MeromorphicModularFormsRing(FormsRing_abstract, CommutativeAlgebra, Unique
"""

@staticmethod
def __classcall__(cls, group = HeckeTriangleGroup(3), base_ring = ZZ, red_hom = False, n=None):
def __classcall__(cls, group=HeckeTriangleGroup(3), base_ring=ZZ, red_hom=False, n=None):
r"""
Return a (cached) instance with canonical parameters.

Expand Down Expand Up @@ -362,7 +362,7 @@ class WeakModularFormsRing(FormsRing_abstract, CommutativeAlgebra, UniqueReprese
"""

@staticmethod
def __classcall__(cls, group = HeckeTriangleGroup(3), base_ring = ZZ, red_hom = False, n=None):
def __classcall__(cls, group=HeckeTriangleGroup(3), base_ring=ZZ, red_hom=False, n=None):
r"""
Return a (cached) instance with canonical parameters.

Expand Down Expand Up @@ -421,7 +421,7 @@ class ModularFormsRing(FormsRing_abstract, CommutativeAlgebra, UniqueRepresentat
"""

@staticmethod
def __classcall__(cls, group = HeckeTriangleGroup(3), base_ring = ZZ, red_hom = False, n=None):
def __classcall__(cls, group=HeckeTriangleGroup(3), base_ring=ZZ, red_hom=False, n=None):
r"""
Return a (cached) instance with canonical parameters.

Expand Down Expand Up @@ -479,7 +479,7 @@ class CuspFormsRing(FormsRing_abstract, CommutativeAlgebra, UniqueRepresentation
"""

@staticmethod
def __classcall__(cls, group = HeckeTriangleGroup(3), base_ring = ZZ, red_hom = False, n=None):
def __classcall__(cls, group=HeckeTriangleGroup(3), base_ring=ZZ, red_hom=False, n=None):
r"""
Return a (cached) instance with canonical parameters.

Expand Down
12 changes: 6 additions & 6 deletions src/sage/modular/modform_hecketriangle/graded_ring_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -1523,7 +1523,7 @@ def full_reduce(self):

#precision is actually accuracy, maybe add "real precision" meaning number of rel. coef
@cached_method
def _q_expansion_cached(self, prec, fix_d, subs_d, d_num_prec, fix_prec = False):
def _q_expansion_cached(self, prec, fix_d, subs_d, d_num_prec, fix_prec=False):
"""
Returns the Fourier expansion of self (cached).
Don't call this function, instead use :meth:`q_expansion`.
Expand Down Expand Up @@ -1590,7 +1590,7 @@ def _q_expansion_cached(self, prec, fix_d, subs_d, d_num_prec, fix_prec = False)

return qexp

def q_expansion(self, prec = None, fix_d = False, d_num_prec = None, fix_prec = False):
def q_expansion(self, prec=None, fix_d=False, d_num_prec=None, fix_prec=False):
"""
Returns the Fourier expansion of self.

Expand Down Expand Up @@ -1694,7 +1694,7 @@ def q_expansion(self, prec = None, fix_d = False, d_num_prec = None, fix_prec =

return self._q_expansion_cached(prec, fix_d, subs_d, d_num_prec, fix_prec)

def q_expansion_fixed_d(self, prec = None, d_num_prec = None, fix_prec = False):
def q_expansion_fixed_d(self, prec=None, d_num_prec=None, fix_prec=False):
"""
Returns the Fourier expansion of self.
The numerical (or exact) value for ``d`` is substituted.
Expand Down Expand Up @@ -1756,7 +1756,7 @@ def q_expansion_fixed_d(self, prec = None, d_num_prec = None, fix_prec = False):

return self.q_expansion(prec, True, d_num_prec, fix_prec)

def q_expansion_vector(self, min_exp = None, max_exp = None, prec = None, **kwargs):
def q_expansion_vector(self, min_exp=None, max_exp=None, prec=None, **kwargs):
r"""
Return (part of) the Laurent series expansion of ``self`` as a vector.

Expand Down Expand Up @@ -1827,7 +1827,7 @@ def q_expansion_vector(self, min_exp = None, max_exp = None, prec = None, **kwar

return vector([qexp[m] for m in range(min_exp, max_exp +1)])

def evaluate(self, tau, prec = None, num_prec = None, check=False):
def evaluate(self, tau, prec=None, num_prec=None, check=False):
r"""
Try to return ``self`` evaluated at a point ``tau``
in the upper half plane, where ``self`` is interpreted
Expand Down Expand Up @@ -2203,7 +2203,7 @@ def evaluate(self, tau, prec = None, num_prec = None, check=False):
f_rho = self.parent().graded_ring().f_rho()
return self._rat.subs(x=f_rho(tau), y=f_i(tau), z=E2(tau), d=dval)

def __call__(self, tau, prec = None, num_prec = None, check=False):
def __call__(self, tau, prec=None, num_prec=None, check=False):
r"""
Try to return ``self`` evaluated at a point ``tau``
in the upper half plane, where ``self`` is interpreted
Expand Down
22 changes: 11 additions & 11 deletions src/sage/modular/modform_hecketriangle/space.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class QuasiMeromorphicModularForms(FormsSpace_abstract, Module, UniqueRepresenta
"""

@staticmethod
def __classcall__(cls, group = HeckeTriangleGroup(3), base_ring = ZZ, k=QQ(0), ep=None, n=None):
def __classcall__(cls, group=HeckeTriangleGroup(3), base_ring=ZZ, k=QQ(0), ep=None, n=None):
r"""
Return a (cached) instance with canonical parameters.

Expand Down Expand Up @@ -131,7 +131,7 @@ class QuasiWeakModularForms(FormsSpace_abstract, Module, UniqueRepresentation):
"""

@staticmethod
def __classcall__(cls, group = HeckeTriangleGroup(3), base_ring = ZZ, k=QQ(0), ep=None, n=None):
def __classcall__(cls, group=HeckeTriangleGroup(3), base_ring=ZZ, k=QQ(0), ep=None, n=None):
r"""
Return a (cached) instance with canonical parameters.

Expand Down Expand Up @@ -178,7 +178,7 @@ class QuasiModularForms(FormsSpace_abstract, Module, UniqueRepresentation):
"""

@staticmethod
def __classcall__(cls, group = HeckeTriangleGroup(3), base_ring = ZZ, k=QQ(0), ep=None, n=None):
def __classcall__(cls, group=HeckeTriangleGroup(3), base_ring=ZZ, k=QQ(0), ep=None, n=None):
r"""
Return a (cached) instance with canonical parameters.

Expand Down Expand Up @@ -340,7 +340,7 @@ class QuasiCuspForms(FormsSpace_abstract, Module, UniqueRepresentation):
"""

@staticmethod
def __classcall__(cls, group = HeckeTriangleGroup(3), base_ring = ZZ, k=QQ(0), ep=None, n=None):
def __classcall__(cls, group=HeckeTriangleGroup(3), base_ring=ZZ, k=QQ(0), ep=None, n=None):
r"""
Return a (cached) instance with canonical parameters.

Expand Down Expand Up @@ -512,7 +512,7 @@ class MeromorphicModularForms(FormsSpace_abstract, Module, UniqueRepresentation)
"""

@staticmethod
def __classcall__(cls, group = HeckeTriangleGroup(3), base_ring = ZZ, k=QQ(0), ep=None, n=None):
def __classcall__(cls, group=HeckeTriangleGroup(3), base_ring=ZZ, k=QQ(0), ep=None, n=None):
r"""
Return a (cached) instance with canonical parameters.

Expand Down Expand Up @@ -559,7 +559,7 @@ class WeakModularForms(FormsSpace_abstract, Module, UniqueRepresentation):
"""

@staticmethod
def __classcall__(cls, group = HeckeTriangleGroup(3), base_ring = ZZ, k=QQ(0), ep=None, n=None):
def __classcall__(cls, group=HeckeTriangleGroup(3), base_ring=ZZ, k=QQ(0), ep=None, n=None):
r"""
Return a (cached) instance with canonical parameters.

Expand Down Expand Up @@ -604,7 +604,7 @@ class ModularForms(FormsSpace_abstract, Module, UniqueRepresentation):
"""

@staticmethod
def __classcall__(cls, group = HeckeTriangleGroup(3), base_ring = ZZ, k=QQ(0), ep=None, n=None):
def __classcall__(cls, group=HeckeTriangleGroup(3), base_ring=ZZ, k=QQ(0), ep=None, n=None):
r"""
Return a (cached) instance with canonical parameters.

Expand Down Expand Up @@ -747,7 +747,7 @@ def coordinate_vector(self, v):
(1, 1/(2*d), 15/(128*d^2))
"""

vec = v.q_expansion_vector(min_exp = 0, max_exp = self.degree() - 1)
vec = v.q_expansion_vector(min_exp=0, max_exp=self.degree() - 1)
return self._module(vec)

class CuspForms(FormsSpace_abstract, Module, UniqueRepresentation):
Expand All @@ -757,7 +757,7 @@ class CuspForms(FormsSpace_abstract, Module, UniqueRepresentation):
"""

@staticmethod
def __classcall__(cls, group = HeckeTriangleGroup(3), base_ring = ZZ, k=QQ(0), ep=None, n=None):
def __classcall__(cls, group=HeckeTriangleGroup(3), base_ring=ZZ, k=QQ(0), ep=None, n=None):
r"""
Return a (cached) instance with canonical parameters.

Expand Down Expand Up @@ -899,7 +899,7 @@ def coordinate_vector(self, v):
True
"""

vec = v.q_expansion_vector(min_exp = 1, max_exp = self.degree())
vec = v.q_expansion_vector(min_exp=1, max_exp=self.degree())
return self._module(vec)

class ZeroForm(FormsSpace_abstract, Module, UniqueRepresentation):
Expand All @@ -909,7 +909,7 @@ class ZeroForm(FormsSpace_abstract, Module, UniqueRepresentation):
"""

@staticmethod
def __classcall__(cls, group = HeckeTriangleGroup(3), base_ring = ZZ, k=QQ(0), ep=None, n=None):
def __classcall__(cls, group=HeckeTriangleGroup(3), base_ring=ZZ, k=QQ(0), ep=None, n=None):
r"""
Return a (cached) instance with canonical parameters.

Expand Down
Loading