fix: use xarray.Dataset copy instead of constructor#647
Conversation
FBumann
left a comment
There was a problem hiding this comment.
Im not sure if we should exclude highspy==1.14.0 from linopy deps. This PR gets the CI working, but users will get wring results with highs. Not fully our responsibility, but worth considering
Yes, we should, but not in this PR. |
|
The CI does not run through because of missing #654 |
| # transpose with new Dataset to really ensure correct order | ||
| data = Dataset(data.transpose(..., TERM_DIM)) | ||
| # Ensure correct dimension order and materialize a new Dataset. | ||
| # Wrapping an existing Dataset in Dataset(...) is no longer supported |
There was a problem hiding this comment.
| # Wrapping an existing Dataset in Dataset(...) is no longer supported |
Remove this explanation. After we merge this it adds nothing. Its more like a commit message
| data = Dataset(data.transpose(..., TERM_DIM)) | ||
| # Ensure correct dimension order and materialize a new Dataset. | ||
| # Wrapping an existing Dataset in Dataset(...) is no longer supported | ||
| # by newer xarray versions. |
There was a problem hiding this comment.
| # by newer xarray versions. |
Remove this explanation. After we merge this it adds nothing. Its more like a commit message
since the latest xarray version, passing a Dataset as `data_vars` to the Dataset constructor is not supported. transpose and assign_coords already returns a new dataset.
|
Ok, thanks. I'll see if i can get a release out today or latest on Monday. |
minimal non-working example:
Changes proposed in this Pull Request
since the latest xarray version, passing a Dataset as
data_varsto the Dataset constructor is not supported. Useds.copy()to create a copy of a Dataset.Checklist
doc.doc/release_notes.rstof the upcoming release is included.