-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support for sums over arrays #43
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK - just one bit of text needs fixing in the errors.
vignettes/errors.Rmd
Outdated
@@ -399,6 +399,58 @@ a <- parameter(type = "integer", differentiate = TRUE) | |||
|
|||
Here, you must decide if `a` should be differentiable (in which case remove the `type` argument) or an integer (in which case remove the `differentiate` argument). | |||
|
|||
# `E1033` | |||
|
|||
The argument to sum must be an array. This can either be a complete array (in which case the argument will be a symbol). So this is fine: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need something connected with the "either" - maybe "or a partial array, by summing across one or more dimensions"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, fixed that
This PR adds support for support for sums - both complete and partial - using C++ functions I've added into dust in mrc-ide/dust2#71
The syntax is identical to that in odin1 and I've added a few notes into the functions vignette to explain the idea.
Very little is required here for prod (mrc-ide/odin#316) but I'd like to do that separately once we're a bit further along.
Update branch pin after merging dust2