We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 75c442c commit 45285eeCopy full SHA for 45285ee
linopy/model.py
@@ -746,7 +746,7 @@ def add_constraints(
746
(data,) = xr.broadcast(data, exclude=[TERM_DIM])
747
748
if mask is not None:
749
- mask = as_dataarray(mask).astype(bool)
+ mask = as_dataarray(mask, coords=data.coords, dims=data.dims).astype(bool)
750
mask = broadcast_mask(mask, data.labels)
751
752
# Auto-mask based on null expressions or NaN RHS (use numpy for speed)
0 commit comments