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

Add cumtrapz/cumtrapz! #24

Merged
merged 5 commits into from
Aug 16, 2024
Merged

Add cumtrapz/cumtrapz! #24

merged 5 commits into from
Aug 16, 2024

Conversation

dingraha
Copy link
Collaborator

I needed a cumulative version of the trapezoidal rule and thought that it would be a good fit for FLOWMath.jl.

@andrewning
Copy link
Member

Great! One suggestion: rather than duplicate the methodology I'd simplify the out of place version to just call the inplace version (or split up in multiple lines if you prefer):

cumtrapz(x, y) = cumtrapz!(similary(y), x, y)

@andrewning andrewning merged commit e5d51c0 into byuflowlab:master Aug 16, 2024
3 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