diff --git a/flixopt/transform_accessor.py b/flixopt/transform_accessor.py index 30fc12a9d..579d4597b 100644 --- a/flixopt/transform_accessor.py +++ b/flixopt/transform_accessor.py @@ -88,7 +88,7 @@ def build_cluster_weights(self) -> xr.DataArray: Returns: DataArray with dims [cluster, period?, scenario?]. """ - return self._unrename(self._agg_result.cluster_weights.rename('cluster_weight')) + return self._unrename(self._agg_result.cluster_counts.rename('cluster_weight')) def build_typical_periods(self) -> dict[str, xr.DataArray]: """Build typical periods DataArrays with (cluster, time, ...) shape. diff --git a/pyproject.toml b/pyproject.toml index b7bddbfad..347f9b253 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ tutorials = [ # Full feature set (everything except dev tools) full = [ - "tsam_xarray >= 0.6.1, < 1", # Time series aggregation for clustering (wraps tsam); 0.6.1 adds aggregate(cluster_on=) + "tsam_xarray >= 0.6.5, < 1", # Time series aggregation for clustering (wraps tsam); 0.6.5 renames cluster_weights to cluster_counts "tsam >= 3.4.0, < 4", # Directly imported for ClusterConfig, ExtremeConfig, SegmentConfig "pyvis==0.3.2", # Visualizing FlowSystem Network "scipy >= 1.15.1, < 2", # Used by tsam. Prior versions have conflict with highspy. See https://github.com/scipy/scipy/issues/22257 @@ -87,7 +87,7 @@ full = [ # Development tools and testing dev = [ "xarray<2026.8", # TODO: drop once linopy ships xarray 2026.3+ compat fix - "tsam_xarray==0.6.1", # Time series aggregation for clustering (wraps tsam) + "tsam_xarray==0.6.5", # Time series aggregation for clustering (wraps tsam) "tsam==3.4.0", # Directly imported for ClusterConfig, ExtremeConfig, SegmentConfig "pytest==9.1.1", "pytest-xdist==3.8.0",