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

Set keep_size=True in v4 #4647

Closed
OriolAbril opened this issue Apr 17, 2021 · 2 comments · Fixed by #5268
Closed

Set keep_size=True in v4 #4647

OriolAbril opened this issue Apr 17, 2021 · 2 comments · Fixed by #5268

Comments

@OriolAbril
Copy link
Member

By default, the output of sample_posterior_predictive and fast_sample_posterior_predictive returns an array with the chain and draw dimensions flattened. This makes conversion to InferenceData more complicated. I propose changing the default to keep_size=True, simplify the code in to_inferencedata and do not support conversion to inferencedata without keep_dims. Users would still be able to get the flattened samples, but to use "on their own". cc @rpgoldman

@brandonwillard
Copy link
Contributor

Sounds fine to me.

@rpgoldman
Copy link
Contributor

I’d suggest you make keep_size default to the same value as the value of return_inference_data to avoid unnecessary breakage to user code. If you do that, then old user code that uses the old return data structures instead of InferenceData will behave as before.

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

Successfully merging a pull request may close this issue.

4 participants