diff --git a/xskillscore/core/np_deterministic.py b/xskillscore/core/np_deterministic.py index f410ab48..041b4740 100644 --- a/xskillscore/core/np_deterministic.py +++ b/xskillscore/core/np_deterministic.py @@ -362,10 +362,7 @@ def _pearson_r_p_value(a, b, weights, axis, skipna): # on 0d arrays is deprecated, as it behaves surprisingly. Use # `atleast_1d(cond).nonzero()` if the old behavior was intended. If the context # of this warning is of the form `arr[nonzero(cond)]`, just use `arr[cond]`. - nan_locs = np.where(np.isnan(np.atleast_1d(r))) - if len(nan_locs[0]) > 0: - res[nan_locs] = np.nan - return res + return np.where(np.isnan(r), np.nan, res) def _pearson_r_eff_p_value(a, b, axis, skipna): diff --git a/xskillscore/core/probabilistic.py b/xskillscore/core/probabilistic.py index 98e8d199..f9fe44b3 100644 --- a/xskillscore/core/probabilistic.py +++ b/xskillscore/core/probabilistic.py @@ -1006,8 +1006,8 @@ def discrimination( array([[0.00437637, 0.15536105, 0.66739606, 0.12472648, 0.04814004], [0.00451467, 0.16704289, 0.66365688, 0.1241535 , 0.04063205]]) Coordinates: - * forecast_probability (forecast_probability) float64 40B 0.1 0.3 0.5 0.7 0.9 * event (event) bool 2B True False + * forecast_probability (forecast_probability) float64 40B 0.1 0.3 0.5 0.7 0.9 References ---------- diff --git a/xskillscore/core/stattests.py b/xskillscore/core/stattests.py index 0a9e20cd..4bb64bf9 100644 --- a/xskillscore/core/stattests.py +++ b/xskillscore/core/stattests.py @@ -121,11 +121,12 @@ def multipletests( [ 0.1 , 0.1 , 0.1 ], [ 0.1 , 0.1 , 0.1 ]]]) Coordinates: + * result (result)