File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ def _crps_ensemble_qd_gufunc(
106106):
107107 """CRPS estimator based on the quantile decomposition form."""
108108 obs = observation [0 ]
109- M = forecasts .shape [0 ]
109+ M = forecasts .shape [- 1 ]
110110
111111 if np .isnan (obs ):
112112 out [0 ] = np .nan
@@ -194,7 +194,7 @@ def _crps_ensemble_pwm_gufunc(
194194):
195195 """CRPS estimator based on the probability weighted moment (PWM) form."""
196196 obs = observation [0 ]
197- M = forecasts .shape [0 ]
197+ M = forecasts .shape [- 1 ]
198198
199199 if np .isnan (obs ):
200200 out [0 ] = np .nan
Original file line number Diff line number Diff line change @@ -48,6 +48,11 @@ def crps_ensemble(
4848 "akr_circperm" ,
4949 "fair" ,
5050 ]:
51+ if hasattr (forecasts , "__dask_graph__" ):
52+ raise NotImplementedError (
53+ "Estimators that need sorting of the ensemble do not yet work with dask. "
54+ "Sort the ensemble beforehand or try another estimator (nrg, akr, akr_circperm or fair)"
55+ )
5156 forecasts = np .sort (forecasts , axis = - 1 )
5257
5358 if estimator == "int" :
You can’t perform that action at this time.
0 commit comments