diff --git a/pyproject.toml b/pyproject.toml index 18adb595..60e8fef5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] diff --git a/src/flint/types/dirichlet.pyx b/src/flint/types/dirichlet.pyx index 4938b883..550cf038 100644 --- a/src/flint/types/dirichlet.pyx +++ b/src/flint/types/dirichlet.pyx @@ -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 """ @@ -190,6 +190,13 @@ cdef class dirichlet_char(object): acb_dirichlet_l((v).val, (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