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

Open dataset in context manager #203

Merged
merged 3 commits into from
Sep 5, 2018

Conversation

ColCarroll
Copy link
Member

This fixes #202 on my machine. I will check travis logs to see if it fixes it there, too.

@ColCarroll ColCarroll merged commit be2cf3b into arviz-devs:master Sep 5, 2018
@aseyboldt
Copy link
Contributor

Do we actually want to close this file here? This means that we need to load everything into memory, right? For some model that might not even fit. Maybe it would be better if we behave a bit more like xarray itself here, and keep the file open as long as the inference data object exists. It could also be a context manager, so that people can make sure the file gets closed.

@aseyboldt
Copy link
Contributor

It also looks to me as if we stumbled into a netcdf or xarray bug in #202. If we have a way to actually reproduce that with xarray alone, we should report that. I'm still failing to reproduce it myself though... :-)

@ahartikainen
Copy link
Contributor

I think we can load data to memory at least for the first release.

And later if we can find out how to do it without killing python, implement it. E.g. use kw to define if data is loaded or not.

@ColCarroll ColCarroll deleted the context-data branch January 30, 2021 02:53
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

Successfully merging this pull request may close these issues.

Changing the order of plotting and file load seems to cause netcdf errors
3 participants