From 20725786405625d7c4a5166d28ae8a8bcdbe0bf6 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Tue, 11 Jul 2023 11:02:39 +0300 Subject: [PATCH] tests: disable starting weights --- tests/test_generating_functions.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/test_generating_functions.py b/tests/test_generating_functions.py index 72a1795..80a65d6 100644 --- a/tests/test_generating_functions.py +++ b/tests/test_generating_functions.py @@ -30,7 +30,7 @@ def test_lubich_bdf_weights( eoc = EOCRecorder(order=order) a, b = 0.0, 1.0 - s = order + s = 0 from math import gamma @@ -38,10 +38,14 @@ def test_lubich_bdf_weights( t = np.linspace(a, b, n) h = t[1] - t[0] w = lubich_bdf_weights(-alpha, order, n) - omega = np.fromiter( - lubich_bdf_starting_weights(w, s, -alpha, beta=1.0), - dtype=np.dtype((w.dtype, s)), - ).reshape(-1, s) + + if s > 0: + omega = np.fromiter( + lubich_bdf_starting_weights(w, s, -alpha, beta=1.0), + dtype=np.dtype((w.dtype, s)), + ) + else: + omega = np.zeros_like(w) int_ref = t**alpha / gamma(1 + alpha) int_bdf = np.empty_like(int_ref)