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

cmdstanr unconstrain draws format changing #8

Open
n-kall opened this issue Jan 2, 2024 · 0 comments
Open

cmdstanr unconstrain draws format changing #8

n-kall opened this issue Jan 2, 2024 · 0 comments

Comments

@n-kall
Copy link
Collaborator

n-kall commented Jan 2, 2024

There's a PR to change the output of unconstrain_draws to a draws object (stan-dev/cmdstanr/pull/886) so we can simplify the code below when that gets merged

iwmm/R/moment_match.R

Lines 601 to 608 in 38bdd3b

udraws <- x$unconstrain_draws()
udraws <- aperm(
abind::abind(
lapply(udraws, function(x) abind::abind(x, along = 2)),
along = 3
),
perm = c(2, 3, 1)
)

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

1 participant