Skip to content

Fix empty trace plots in fit_map with mcmc='numpyro' - #47

Open
richteague wants to merge 1 commit into
masterfrom
fix/numpyro-trace-plot
Open

richteague wants to merge 1 commit into
masterfrom
fix/numpyro-trace-plot

Conversation

@richteague

Copy link
Copy Markdown
Collaborator

The numpyro adapter stores its chain as (num_chains, total_steps, ndim),
but fit_map reshaped it with the same rollaxis(2) used for zeus, whose
chain is (nsteps, nwalkers, ndim). plot_walkers then received
(ndim, num_chains, total_steps), drew each "walker" as a single point,
and sliced an empty histogram, so every trace panel came out blank.
Transpose the adapter chain to (ndim, total_steps, num_chains) instead,
matching what Annulus3D already does.

🤖 Generated with Claude Code

The numpyro adapter stores its chain as (num_chains, total_steps, ndim),
but fit_map reshaped it with the same rollaxis(2) used for zeus, whose
chain is (nsteps, nwalkers, ndim). plot_walkers then received
(ndim, num_chains, total_steps), drew each "walker" as a single point,
and sliced an empty histogram, so every trace panel came out blank.
Transpose the adapter chain to (ndim, total_steps, num_chains) instead,
matching what Annulus3D already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant