From f8fd9943b9d4b1a3154adb5c11b42b486dbfb7d2 Mon Sep 17 00:00:00 2001 From: manud99 <19774382+manud99@users.noreply.github.com> Date: Wed, 8 Jul 2026 10:13:48 +0200 Subject: [PATCH] Change sum method parameter type to DimsLike --- linopy/variables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linopy/variables.py b/linopy/variables.py index 0eed704d..1d07e8a1 100644 --- a/linopy/variables.py +++ b/linopy/variables.py @@ -1122,7 +1122,7 @@ def to_polars(self) -> pl.DataFrame: check_has_nulls_polars(df, name=f"{self.type} {self.name}") return df - def sum(self, dim: str | None = None, **kwargs: Any) -> LinearExpression: + def sum(self, dim: DimsLike | None = None, **kwargs: Any) -> LinearExpression: """ Sum the variables over all or a subset of dimensions.