Skip to content

Commit 125a7c3

Browse files
authored
fix: widen Variable.sum dim parameter type to DimsLike (#820)
1 parent f759df9 commit 125a7c3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

linopy/variables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ def to_polars(self) -> pl.DataFrame:
11221122
check_has_nulls_polars(df, name=f"{self.type} {self.name}")
11231123
return df
11241124

1125-
def sum(self, dim: str | None = None, **kwargs: Any) -> LinearExpression:
1125+
def sum(self, dim: DimsLike | None = None, **kwargs: Any) -> LinearExpression:
11261126
"""
11271127
Sum the variables over all or a subset of dimensions.
11281128

0 commit comments

Comments
 (0)