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
Current implementation does this:
def open_dataset(*args, **kwargs): ds = xr.open_dataset(*args, **kwargs) return UgridDataset(ds)
Internally, the UgridDataset constructor creates a new dataset, and so the ds reference is lost, making UgridDataset.close() a dud.
ds
UgridDataset.close()
We should likely do something like:
class UgridDataset: def __init__(self, dataset): self._original = dataset # ... rest of initialization def close(self): self._original.close()
It might be possible that dataset is None, though.
dataset
Explicit indexes would also solve this, since we'd just use/return an ordinary xarray dataset.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Current implementation does this:
Internally, the UgridDataset constructor creates a new dataset, and so the
ds
reference is lost, makingUgridDataset.close()
a dud.We should likely do something like:
It might be possible that
dataset
is None, though.Explicit indexes would also solve this, since we'd just use/return an ordinary xarray dataset.
The text was updated successfully, but these errors were encountered: