Skip to content

Commit 8b2a3ee

Browse files
Merge pull request #212 from GiacomoPope/l_function_name
rename l_function method name
2 parents 3d0eb95 + e5ee5d4 commit 8b2a3ee

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

pyproject.toml

+1-5
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,8 @@ build-backend = "mesonpy"
5353
# E741 ambiguous variable name
5454
# Reasoning: many places it makes sense to use l or other letters as variable
5555
# names as it is standard in mathematical notation.
56-
#
57-
# E743 ambiguous function definition
58-
# Reasoning: this is a work in progress and will be enforced after #210 is
59-
# resolved.
6056
max-line-length = 120
61-
ignore = ['E129','E501','E741','E743']
57+
ignore = ['E129','E501','E741']
6258
exclude = 'src/flint/flintlib/functions.*'
6359

6460
[tool.spin]

src/flint/types/dirichlet.pyx

+10-3
Original file line numberDiff line numberDiff line change
@@ -170,17 +170,17 @@ cdef class dirichlet_char(object):
170170
else:
171171
return fmpz(v)
172172

173-
def l(self, s):
173+
def l_function(self, s):
174174
"""
175175
Evaluates the Dirichlet L-function of this character at the given
176176
complex number s.
177177
178178
>>> from flint import showgood
179179
>>> chi = dirichlet_char(1, 1)
180-
>>> showgood(lambda: chi.l(2), dps=25)
180+
>>> showgood(lambda: chi.l_function(2), dps=25)
181181
1.644934066848226436472415
182182
>>> chi = dirichlet_char(7, 3)
183-
>>> showgood(lambda: chi.l(2+3j), dps=25)
183+
>>> showgood(lambda: chi.l_function(2+3j), dps=25)
184184
1.273313649440490751755284 - 0.07432329442559421607102118j
185185
186186
"""
@@ -190,6 +190,13 @@ cdef class dirichlet_char(object):
190190
acb_dirichlet_l((<acb>v).val, (<acb>s).val, self.G.val, self.val, getprec())
191191
return v
192192

193+
# For backwards compatibility we allow self.l(s) see Issue #210
194+
def l(self, s): # no-cython-lint
195+
"""
196+
Alias for :meth:`l_function`
197+
"""
198+
return self.l_function(s)
199+
193200
def hardy_z(self, s):
194201
"""
195202
Evaluates the Hardy Z-function of this character at the given

0 commit comments

Comments
 (0)