Commit 6768b3b1 authored by Klaus Zimmermann's avatar Klaus Zimmermann
Browse files

fix: Use np.isfinite to test for infite ssr threshold

parent ac81bf39
......@@ -141,7 +141,7 @@ class DOYSmootingSpline:
else:
ssr_y_threshold = d[0][d[0] > 0.0].min()
ssr_threshold = min(ssr_x_threshold, ssr_y_threshold)
if not np.isnan(ssr_threshold):
if np.isfinite(ssr_threshold):
x_below_threshold = d[1] < ssr_threshold
no_x_below_threshold = np.count_nonzero(x_below_threshold)
random_fill = rng.uniform(0.0, ssr_threshold, no_x_below_threshold)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment