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 extrapolation keyword #193

Merged

Conversation

sathvikbhagavan
Copy link
Member

No description provided.

@@ -1,4 +1,7 @@
derivative(A, t) = derivative(A, t, firstindex(A.t) - 1)[1]
function derivative(A, t)
((t < A.t[1] || t > A.t[end]) && !A.extrapolate) && error("Cannot extrapolate!")
Copy link
Member

Choose a reason for hiding this comment

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

we should make this an error type and throw it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed in d45c36f

@sathvikbhagavan sathvikbhagavan force-pushed the sb/add_extrapolate_keyword branch from ed776c8 to 1802631 Compare October 17, 2023 04:01
@sathvikbhagavan sathvikbhagavan marked this pull request as ready for review October 17, 2023 05:18
@ChrisRackauckas ChrisRackauckas merged commit 5ad4c24 into SciML:master Oct 17, 2023
6 of 7 checks passed
@ChrisRackauckas
Copy link
Member

It might be nice to turn off extrapolation by default. Worth chatting about.

@sathvikbhagavan
Copy link
Member Author

It might be nice to turn off extrapolation by default

Yeah, it might be better as the expected behaviour of any interpolation should be within the range of time points provided.
Extrapolations should be allowed only if needed. Should I make a PR for changing that?

@ChrisRackauckas
Copy link
Member

yes

@ChrisRackauckas ChrisRackauckas mentioned this pull request Oct 17, 2023
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