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

rename l_function method name #212

Merged
merged 3 commits into from
Sep 9, 2024
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: 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
Loading