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

Sort variable indices from MCMCChains ourselves #139

Merged
merged 7 commits into from
Aug 3, 2021
Merged

Conversation

sethaxen
Copy link
Member

@sethaxen sethaxen commented Aug 2, 2021

Resolves issue where depending on how an MCMCChains.Chains was created, slicing variables from the underlying AxisArray may or may not return the subarray with the variables in the same order we requested. To avoid the issue, now we don't slice at all. Fixes #138.

@sethaxen
Copy link
Member Author

sethaxen commented Aug 2, 2021

@AnselmJeong can you verify that this PR fixes the issue you raised?

@AnselmJeong
Copy link

I cannot help but be amazed by your enthusiasm for your project....

I check the code and verified that the two results summarystats(chain) and summarystats(from_mcmcchain(chan)) coincide with each other. I compared the obtained parameter values and the original data, and concluded that the newest code report the parameter in correct order.

Thanks again....

@sethaxen
Copy link
Member Author

sethaxen commented Aug 3, 2021

I cannot help but be amazed by your enthusiasm for your project....

Thanks for the kind words! It helps to hear from users, and thanks so much for raising this issue so we could fix it.

I check the code and verified that the two results summarystats(chain) and summarystats(from_mcmcchain(chan)) coincide with each other. I compared the obtained parameter values and the original data, and concluded that the newest code report the parameter in correct order.

Great! Thanks for confirming.

@sethaxen sethaxen merged commit 17f2e7e into main Aug 3, 2021
@sethaxen sethaxen deleted the mcmcchainssort branch August 3, 2021 14:21
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.

Order of the multi-level parameter is not preserved when converted into InferenceData
2 participants