From ef37025322be2021336d64aa7a975bd8ccbc270a Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Tue, 12 Dec 2023 11:28:58 +0200 Subject: [PATCH] fix: linting errors --- pycaputo/generating_functions.py | 4 ++-- pycaputo/quadrature/riemann_liouville.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pycaputo/generating_functions.py b/pycaputo/generating_functions.py index 3e9a954..9064c57 100644 --- a/pycaputo/generating_functions.py +++ b/pycaputo/generating_functions.py @@ -338,8 +338,8 @@ def newton_gregory_weights(alpha: float, k: int, n: int) -> Array: omega = np.empty(n + 1) omega[0] = 1.0 - for k in range(1, n + 1): - omega[k] = (1 + (alpha - 1) / k) * omega[k - 1] + for i in range(1, n + 1): + omega[i] = (1 + (alpha - 1) / i) * omega[i - 1] omega[1:] = (1 - alpha / 2) * omega[1:] + alpha / 2 * omega[:-1] omega[0] = 1 - alpha / 2.0 diff --git a/pycaputo/quadrature/riemann_liouville.py b/pycaputo/quadrature/riemann_liouville.py index b4570da..7060bfd 100644 --- a/pycaputo/quadrature/riemann_liouville.py +++ b/pycaputo/quadrature/riemann_liouville.py @@ -476,7 +476,7 @@ def name(self) -> str: @property def order(self) -> float: - # FIXME: this is not the corect order! + # FIXME: this is not the correct order! return min(1.0, -self.d.order) @@ -493,8 +493,8 @@ def _quad_rl_conv( from pycaputo.generating_functions import ( lmm_starting_weights, - lubich_starting_powers, lubich_bdf_weights, + lubich_starting_powers, ) fx = f(p.x) if callable(f) else f