From 31b73c926a00e33b0488c86cbcb51866f46f84bd Mon Sep 17 00:00:00 2001 From: juliettelavoie Date: Mon, 6 Jan 2025 17:24:56 -0500 Subject: [PATCH] suggestion --- src/xclim/ensembles/_partitioning.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xclim/ensembles/_partitioning.py b/src/xclim/ensembles/_partitioning.py index 38929135f..00582714b 100644 --- a/src/xclim/ensembles/_partitioning.py +++ b/src/xclim/ensembles/_partitioning.py @@ -362,7 +362,8 @@ def general_partition( raise ValueError("This algorithm expects annual time series.") if not ({"time"} | set(all_types)).issubset(da.dims): - raise ValueError(f"DataArray dimensions should include {all_types} and time.") + error_msg = f"DataArray dimensions should include {all_types} and time." + raise ValueError(error_msg) if sm == "poly": # Fit a 4th order polynomial