Skip to content

Commit b2385be

Browse files
committed
Make sure that nan values are not incorrectly replaced with zeros
1 parent c5674c9 commit b2385be

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pysteps/postprocessing/ensemblestats.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ def excprob(X, X_thr, ignore_nan=False):
110110

111111
X_[X >= x] = 1.0
112112
X_[X < x] = 0.0
113+
X_[~np.isfinite(X)] = np.nan
113114

114115
if ignore_nan:
115116
P.append(np.nanmean(X_, axis=0))

0 commit comments

Comments
 (0)