We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b01def commit ad61632Copy full SHA for ad61632
1 file changed
linopy/model.py
@@ -746,7 +746,10 @@ def add_piecewise_constraint(
746
if is_single:
747
# Single expression case
748
target_expr = self._to_linexpr(expr)
749
- lambda_coords = breakpoints.coords
+ # Build lambda coordinates from breakpoints dimensions
750
+ lambda_coords = [
751
+ pd.Index(breakpoints.coords[d].values, name=d) for d in breakpoints.dims
752
+ ]
753
lambda_mask = self._compute_pwl_mask(mask, breakpoints, skip_nan_check)
754
755
else:
0 commit comments