From 2aaf053cae277c3be44e430690625f9d90e303c7 Mon Sep 17 00:00:00 2001 From: Nate Pope Date: Thu, 28 Dec 2023 15:13:18 -0800 Subject: [PATCH] Remove some debugging inserts --- tsdate/hypergeo.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tsdate/hypergeo.py b/tsdate/hypergeo.py index dc91a1e5..b650bbcc 100644 --- a/tsdate/hypergeo.py +++ b/tsdate/hypergeo.py @@ -137,9 +137,9 @@ def _hyp2f1_taylor_series(a, b, c, z): To avoid overflow, returns the function value on a log scale and the derivatives divided by the (unlogged) function value. """ - if not (1.0 > z >= 0.0 and a >= 0.0 and b >= 0.0 and c > 0.0): - print("bad taylor:", a, b, c, z) # DEBUG - raise Invalid2F1("Taylor expansion requires nonnegative arguments") + assert 1.0 > z >= 0.0 + if not (a >= 0.0 and b >= 0.0 and c > 0.0): + raise Invalid2F1("Negative parameters in Taylor series") if z == 0.0: val = 0.0 @@ -416,9 +416,6 @@ def _hyp2f1(a_i, b_i, a_j, b_j, y, mu): Overflow protection entails log-transforming the function value, and dividing the gradient by the function value. """ - a = a_j - b = a_j + a_i + y - c = a_j + y + 1 z = (mu - b_j) / (mu + b_i) assert z < 1.0, "Invalid argument" if z > 0.0: