Skip to content

Commit bb6b8a4

Browse files
committed
Bug fix: xarray copyies need to be .
1 parent 2da2d35 commit bb6b8a4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

linopy/model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,7 +1913,7 @@ def copy(self, include_solution: bool = False) -> Model:
19131913
name: Variable(
19141914
var.data.copy()
19151915
if include_solution
1916-
else var.data[self.variables.dataset_attrs].copy(),
1916+
else var.data[self.variables.dataset_attrs].copy(deep=True),
19171917
m,
19181918
name,
19191919
)
@@ -1927,7 +1927,7 @@ def copy(self, include_solution: bool = False) -> Model:
19271927
name: Constraint(
19281928
con.data.copy()
19291929
if include_solution
1930-
else con.data[self.constraints.dataset_attrs].copy(),
1930+
else con.data[self.constraints.dataset_attrs].copy(deep=True),
19311931
m,
19321932
name,
19331933
)

0 commit comments

Comments
 (0)