Skip to content

Commit 672a5cc

Browse files
committed
Remove extra index increment leading to possible IndexError
1 parent ba2c811 commit 672a5cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pysteps/nowcasts/sprog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ def _compute_sprog_mask(R, war):
462462
i = np.argmin(abs(x - war))
463463
# handle ties
464464
if R_s[i] == R_s[i + 1]:
465-
i = np.where(R_s == R_s[i])[0][-1] + 1
465+
i = np.where(R_s == R_s[i])[0][-1]
466466
R_pct_thr = R_s[i]
467467

468468
# determine a mask using the above threshold value to preserve the

0 commit comments

Comments
 (0)