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

az.summary ignores the parameter coords #1732

Closed
impact27 opened this issue Jun 22, 2021 · 2 comments
Closed

az.summary ignores the parameter coords #1732

impact27 opened this issue Jun 22, 2021 · 2 comments

Comments

@impact27
Copy link

impact27 commented Jun 22, 2021

Describe the bug
I have a arviz.data.inference_data.InferenceData object with several 'chain'. I want to select some of them. I use:

results_summary = az.summary(trace, coords={"chain": [0, 1, 2]})

But it looks like the coords parameter doesn't do anything.

To Reproduce
Sample a model with

import pymc3 as pm
[...]
with pm.Model():
    [...]
    trace = pm.sample(return_inferencedata=True, chains=8)
results_summary = az.summary(trace, coords={"chain": [0, 1, 2]})

Expected behavior
I would expect only the chains 0, 1, 2 to be used for results_summary

Additional context
Versions of arviz and other libraries used, operating system used, and anything else that may be useful.

az.__version__ = '0.11.2'
pm.__version__ = '3.11.2'

On WIndows 10

@ahartikainen
Copy link
Contributor

Until we fix this, for now I think .sel methods could be used to select the chains and then you can call summary.

@OriolAbril
Copy link
Member

It's already fixed in main branch. Was fixed by #1201 iirc

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

4 participants