FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

rename l_function method name by GiacomoPope · Pull Request #212 · flintlib/python-flint · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .pyx  (1) .toml  (1) All 2 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
6 changes: 1 addition & 5 deletions pyproject.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Back | FazBrowse Home | New Git URL