We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nlayer = 1 nrow = 5 ncol = 5 dx = 1000.0 dy = -1000.0 x = np.arange(0, dx * ncol, dx) + 0.5 * dx y = np.arange(0, dy * nrow, dy) + 0.5 * dy layer = np.array([1]) idomain = xr.DataArray(np.ones((nlayer, nrow, ncol), dtype=int), dims=("layer", "y", "x"), coords={"layer": layer, "y": y, "x": x}) rch_rate = xr.full_like(idomain.sel(layer=1), 0.001, dtype=float) rch = imod.mf6.Recharge(rch_rate) rch.copy()
Results in:
TypeError: Recharge.__init__() got an unexpected keyword argument 'coords'
Problem is:
def copy(self) -> Any: # All state should be contained in the dataset. return type(self)(**self.dataset.copy().to_dict())
to_dict() will insert a coords member, which obviously won't be a keyword for a package.
The text was updated successfully, but these errors were encountered:
Simple removing the .to_dict() call might fix it?
.to_dict()
Also having this unit-tested would be good...
Sorry, something went wrong.
Issue #1498 mf6 Package: copy method is broken (#1505)
e1df40e
Fixes #1498 # Description Fix broken copy method # Checklist <!--- Before requesting review, please go through this checklist: --> - [x] Links to correct issue - [x] Update changelog, if changes affect users - [x] PR title starts with ``Issue #nr``, e.g. ``Issue #737`` - [x] Unit tests were added - [ ] **If feature added**: Added/extended example --------- Co-authored-by: JoerivanEngelen <joerivanengelen@hotmail.com>
verkaik
JoerivanEngelen
Successfully merging a pull request may close this issue.
Results in:
Problem is:
to_dict() will insert a coords member, which obviously won't be a keyword for a package.
The text was updated successfully, but these errors were encountered: