Skip to content

Fix handling of scalar vs length-1 vector in modelValues, including for as.matrix column names - #69

Merged
perrydv merged 3 commits into
mainfrom
scalar-col-names
Oct 27, 2026
Merged

perrydv merged 3 commits into
mainfrom
scalar-col-names

Conversation

@perrydv

@perrydv perrydv commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

This PR builds on recent extension of nList in nCompiler to be able to query the nDim and scalar element type of nLists of basic types. This allows that from an nList base class we can query this information for the underlying derived nList object. That in turn allows as.matrix and related steps for a modelValues to correctly determine whether a column of output is a true scalar (e.g. "mu") or a length-1 vector (e.g. "mu[1]"), matching nimble's behavior.

@paciorek I'm hoping this is relatively simple and doesn't impact much else so if tests pass we can merge it.

@perrydv

perrydv commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

@paciorek This has passed tests. Ok if I merge it? (It had initial test failures that I think were due to using an older version of nCompiler, when it needed to be using a just-merged version of that. It passed subsequently on new runs.)

@perrydv
perrydv merged commit 08346a2 into main Oct 27, 2026
4 checks passed
@perrydv
perrydv deleted the scalar-col-names branch October 27, 2026 21:30
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