Skip to content

robustify dimension checking in case of dynamic indexing - #1632

Merged
paciorek merged 7 commits into
develfrom
robustify-dim-check
Aug 18, 2026
Merged

robustify dimension checking in case of dynamic indexing#1632
paciorek merged 7 commits into
develfrom
robustify-dim-check

Conversation

@paciorek

Copy link
Copy Markdown
Contributor

A user noted that with RHS-only dynamically indexed variables, we produce a warning message. This is somewhat new (didn't happen in 1.1.0) and caused by some additional checking we (probably I) put in at some point. This PR relaxes that check.

Here's a working example:

code <- nimbleCode({
    for(i in 1:3) {
        y[i] <- x[z[i],1]
        z[i] ~ dcat(p[1:3])
        }
})
m <-nimbleModel(code,inits=list(z=c(3,1,2)),data=list(x=matrix(rnorm(8),8,1)))
Defining model
  [Warning] dimensions specified are larger than model specification
            for variable `x`.

@paciorek
paciorek merged commit 92d71b8 into devel Aug 18, 2026
6 of 8 checks passed
@paciorek
paciorek deleted the robustify-dim-check branch August 18, 2026 19:53
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