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

Make extrapolation with NaN Unitful-friendly #366

Merged
merged 3 commits into from
Dec 1, 2024

Conversation

Ickaser
Copy link
Contributor

@Ickaser Ickaser commented Nov 25, 2024

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

Additional context

Would in theory close #365 .

@SouthEndMusic
Copy link
Member

Maybe also add a test to prevent regression.

@Ickaser
Copy link
Contributor Author

Ickaser commented Nov 26, 2024

Maybe also add a test to prevent regression.

Happy to do so; should I just test with Float64 or go all the way to adding Unitful as a test dependency to test the case I was working with?

@SouthEndMusic
Copy link
Member

I think it's fine to add Unitful as a test dependency, but better ask @sathvikbhagavan first.

@sathvikbhagavan
Copy link
Member

Yes, its fine to add it as a test dependency

@Ickaser
Copy link
Contributor Author

Ickaser commented Nov 29, 2024

OK, I've added a test for this specific case, and on my machine all the tests now pass. As far as I can tell, there were no similar NaN checks for other interpolation types, so this should be good to go I think.

@ChrisRackauckas ChrisRackauckas merged commit 7df4954 into SciML:master Dec 1, 2024
12 of 16 checks passed
@Ickaser Ickaser deleted the nan_interp branch December 1, 2024 12:10
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.

Error rather than NaN result if Unitful arrays passed to LinearInterpolation
4 participants