Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Klaus Zimmermann
MIdAS
Commits
6768b3b1
Commit
6768b3b1
authored
May 31, 2021
by
Klaus Zimmermann
Browse files
fix: Use np.isfinite to test for infite ssr threshold
parent
ac81bf39
Changes
1
Hide whitespace changes
Inline
Side-by-side
midas/doy_kernels.py
View file @
6768b3b1
...
...
@@ -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
n
ot
np
.
isnan
(
ssr_threshold
):
if
n
p
.
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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment