From e7b1970e5281ef9fab22e8797bc9607aa68ec07d Mon Sep 17 00:00:00 2001 From: Aaron Spring <12237157+aaronspring@users.noreply.github.com> Date: Sat, 11 Oct 2025 11:02:06 +0200 Subject: [PATCH 1/4] Roll back atleast in pearsonreff --- xskillscore/core/np_deterministic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xskillscore/core/np_deterministic.py b/xskillscore/core/np_deterministic.py index f410ab48..1ab40743 100644 --- a/xskillscore/core/np_deterministic.py +++ b/xskillscore/core/np_deterministic.py @@ -362,7 +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))) + nan_locs = np.where(np.isnan(r)) if len(nan_locs[0]) > 0: res[nan_locs] = np.nan return res From 0afc7b1e9d811ec248658cf52b9697dee9a26199 Mon Sep 17 00:00:00 2001 From: Aaron Spring <12237157+aaronspring@users.noreply.github.com> Date: Sat, 11 Oct 2025 11:54:41 +0200 Subject: [PATCH 2/4] np_deterministic.py aktualisieren sonnet4.5 --- xskillscore/core/np_deterministic.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/xskillscore/core/np_deterministic.py b/xskillscore/core/np_deterministic.py index 1ab40743..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(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): From 5406ddcc235e820c4cad93b9c21b08ec46bc11f8 Mon Sep 17 00:00:00 2001 From: Aaron Spring <12237157+aaronspring@users.noreply.github.com> Date: Sat, 11 Oct 2025 12:16:47 +0200 Subject: [PATCH 3/4] stattests.py aktualisieren --- xskillscore/core/stattests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) Date: Sat, 11 Oct 2025 12:21:27 +0200 Subject: [PATCH 4/4] probabilistic.py aktualisieren --- xskillscore/core/probabilistic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ----------