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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Ickaser
Copy link

@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
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
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.

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