Skip to content
New issue

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

Implement __enter__ and __exit__; enable with blocks #170

Open
Huite opened this issue Oct 27, 2023 · 0 comments
Open

Implement __enter__ and __exit__; enable with blocks #170

Huite opened this issue Oct 27, 2023 · 0 comments

Comments

@Huite
Copy link
Collaborator

Huite commented Oct 27, 2023

I might've investigated this before, but if I'm not mistaken a with block like this currently does not close:

with xu.open_dataset(path) as uds:
     print(uds)

I'm under the impression that this does work for xarray DataArrays and Datasets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant