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

fix ndim=1 error in samplerKwargs #70

Merged
merged 3 commits into from Oct 21, 2020
Merged

Conversation

jbirky
Copy link
Contributor

@jbirky jbirky commented Sep 22, 2020

It looks like samplerKwargs["ndim"] = ap.theta.shape[-1] in mcmcUtils.py causes an error if ndim=1 since theta is stored as self.theta = np.array(theta).squeeze() in line 87 of approx.py which changes the shape of theta from (nsamples,1) to (nsamples,). So for 1D, ndim is being set to samplerKwargs["ndim"]=nsamples, not samplerKwargs["ndim"]=1.

@dflemin3 dflemin3 merged commit 3192b1c into dflemin3:master Oct 21, 2020
@dflemin3
Copy link
Owner

Thanks for these fixes and quality-of-life improvements!

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.

None yet

2 participants