Skip to content

Commit

Permalink
Merge pull request #212 from GiacomoPope/l_function_name
Browse files Browse the repository at this point in the history
rename l_function method name
  • Loading branch information
oscarbenjamin committed Sep 9, 2024
2 parents 3d0eb95 + e5ee5d4 commit 8b2a3ee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
6 changes: 1 addition & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,8 @@ build-backend = "mesonpy"
# E741 ambiguous variable name
# Reasoning: many places it makes sense to use l or other letters as variable
# names as it is standard in mathematical notation.
#
# E743 ambiguous function definition
# Reasoning: this is a work in progress and will be enforced after #210 is
# resolved.
max-line-length = 120
ignore = ['E129','E501','E741','E743']
ignore = ['E129','E501','E741']
exclude = 'src/flint/flintlib/functions.*'

[tool.spin]
Expand Down
13 changes: 10 additions & 3 deletions src/flint/types/dirichlet.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,17 @@ cdef class dirichlet_char(object):
else:
return fmpz(v)

def l(self, s):
def l_function(self, s):
"""
Evaluates the Dirichlet L-function of this character at the given
complex number s.
>>> from flint import showgood
>>> chi = dirichlet_char(1, 1)
>>> showgood(lambda: chi.l(2), dps=25)
>>> showgood(lambda: chi.l_function(2), dps=25)
1.644934066848226436472415
>>> chi = dirichlet_char(7, 3)
>>> showgood(lambda: chi.l(2+3j), dps=25)
>>> showgood(lambda: chi.l_function(2+3j), dps=25)
1.273313649440490751755284 - 0.07432329442559421607102118j
"""
Expand All @@ -190,6 +190,13 @@ cdef class dirichlet_char(object):
acb_dirichlet_l((<acb>v).val, (<acb>s).val, self.G.val, self.val, getprec())
return v

# For backwards compatibility we allow self.l(s) see Issue #210
def l(self, s): # no-cython-lint
"""
Alias for :meth:`l_function`
"""
return self.l_function(s)

def hardy_z(self, s):
"""
Evaluates the Hardy Z-function of this character at the given
Expand Down

0 comments on commit 8b2a3ee

Please sign in to comment.