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

Support for sums over arrays #43

Merged
merged 8 commits into from
Sep 17, 2024
Merged

Support for sums over arrays #43

merged 8 commits into from
Sep 17, 2024

Conversation

richfitz
Copy link
Member

@richfitz richfitz commented Sep 13, 2024

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

@richfitz richfitz requested a review from weshinsley September 13, 2024 10:22
Copy link
Contributor

@weshinsley weshinsley left a 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.

@@ -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:
Copy link
Contributor

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"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, fixed that

@richfitz richfitz merged commit d52ead0 into main Sep 17, 2024
7 checks passed
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.

2 participants