Skip to content

Conversation

@DaniGlez
Copy link
Contributor

@DaniGlez DaniGlez commented Sep 2, 2024

If the span of the vector (last(v) - first(v)) is 0, the current linear guessing relies on an isinf guard. This fails for one value, first(v), since the linear-guess quotient 0/0 produces a NaN instead of +Inf or -Inf. This PR aims to patch that edge case.

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

@ChrisRackauckas
Copy link
Member

I don't want to know what real world case made you find this 😅

@ChrisRackauckas ChrisRackauckas merged commit 009160c into SciML:main Sep 2, 2024
@DaniGlez
Copy link
Contributor Author

DaniGlez commented Sep 2, 2024

It's through usage of DataInterpolations, I promise it's more sensible than one might think 😅

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