Skip to content

Commit e76bc5f

Browse files
committed
switch to n_cusps instead
1 parent ddb0ff9 commit e76bc5f

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/sage/modular/etaproducts.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def EtaGroup(level):
8484

8585
class EtaGroupElement(Element):
8686

87-
def __init__(self, parent, rdict):
87+
def __init__(self, parent, rdict) -> None:
8888
r"""
8989
Create an eta product object. Usually called implicitly via
9090
EtaGroup_class.__call__ or the EtaProduct factory function.
@@ -419,7 +419,7 @@ class EtaGroup_class(UniqueRepresentation, Parent):
419419
True
420420
"""
421421

422-
def __init__(self, level):
422+
def __init__(self, level) -> None:
423423
r"""
424424
Create the group of eta products of a given level, which must be a
425425
positive integer.
@@ -662,7 +662,7 @@ def EtaProduct(level, dic) -> EtaGroupElement:
662662
return EtaGroup(level)(dic)
663663

664664

665-
def ncusps_of_width(N, d) -> Integer:
665+
def n_cusps_of_width(N, d) -> Integer:
666666
r"""
667667
Return the number of cusps on `X_0(N)` of width ``d``.
668668
@@ -674,10 +674,10 @@ def ncusps_of_width(N, d) -> Integer:
674674
675675
EXAMPLES::
676676
677-
sage: from sage.modular.etaproducts import ncusps_of_width
678-
sage: [ncusps_of_width(18,d) for d in divisors(18)]
677+
sage: from sage.modular.etaproducts import n_cusps_of_width
678+
sage: [n_cusps_of_width(18,d) for d in divisors(18)]
679679
[1, 1, 2, 2, 1, 1]
680-
sage: ncusps_of_width(4,8)
680+
sage: n_cusps_of_width(4,8)
681681
Traceback (most recent call last):
682682
...
683683
ValueError: N and d must be positive integers with d|N
@@ -698,12 +698,12 @@ def ncusps_of_width(N, d) -> Integer:
698698
return euler_phi(d.gcd(N // d))
699699

700700

701-
num_cusps_of_width = ncusps_of_width
701+
num_cusps_of_width = n_cusps_of_width
702702

703703

704704
def AllCusps(N) -> list:
705705
r"""
706-
Return a list of CuspFamily objects corresponding to the cusps of
706+
Return a list of :class:`CuspFamily` objects corresponding to the cusps of
707707
`X_0(N)`.
708708
709709
INPUT:
@@ -725,7 +725,7 @@ def AllCusps(N) -> list:
725725

726726
c = []
727727
for d in divisors(N):
728-
n = ncusps_of_width(N, d)
728+
n = n_cusps_of_width(N, d)
729729
if n == 1:
730730
c.append(CuspFamily(N, d))
731731
elif n > 1:
@@ -739,7 +739,7 @@ class CuspFamily(SageObject):
739739
r"""
740740
A family of elliptic curves parametrising a region of `X_0(N)`.
741741
"""
742-
def __init__(self, N, width, label=None):
742+
def __init__(self, N, width, label=None) -> None:
743743
r"""
744744
Create the cusp of width d on X_0(N) corresponding to the family
745745
of Tate curves `(\CC_p/q^d, \langle \zeta q\rangle)`.
@@ -762,9 +762,9 @@ def __init__(self, N, width, label=None):
762762
self._width = width
763763
if N % width:
764764
raise ValueError("bad width")
765-
if ncusps_of_width(N, width) > 1 and label is None:
766-
raise ValueError("there are %s > 1 cusps of width %s on X_0(%s): specify a label" % (ncusps_of_width(N, width), width, N))
767-
if ncusps_of_width(N, width) == 1 and label is not None:
765+
if n_cusps_of_width(N, width) > 1 and label is None:
766+
raise ValueError("there are %s > 1 cusps of width %s on X_0(%s): specify a label" % (n_cusps_of_width(N, width), width, N))
767+
if n_cusps_of_width(N, width) == 1 and label is not None:
768768
raise ValueError("there is only one cusp of width %s on X_0(%s): no need to specify a label" % (width, N))
769769
self.label = label
770770

0 commit comments

Comments
 (0)