Fix plotting interpolation bug with spatial variables#4841
Merged
Conversation
MarcBerliner
marked this pull request as ready for review
February 12, 2025 21:04
MarcBerliner
requested review from
Saransh-cpp,
agriyakhetarpal,
kratman,
martinjrobins,
rtimms and
valentinsulzer
as code owners
February 12, 2025 21:04
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4841 +/- ##
========================================
Coverage 98.70% 98.70%
========================================
Files 303 303
Lines 23328 23335 +7
========================================
+ Hits 23025 23032 +7
Misses 303 303 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
agriyakhetarpal
approved these changes
Feb 12, 2025
kratman
approved these changes
Feb 12, 2025
RohitP2005
pushed a commit
to RohitP2005/PyBaMM
that referenced
this pull request
Feb 13, 2025
* fix plotting interpolation bug * Update CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When the time axis changes scale (e.g., from seconds to hours or days), minor floating-point arithmetic issues at the initial and final times can cause interpolation outside the timespan. As a result, the spatial variables could return
NaNat the initial and final time pointsType of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #)
Important checks:
Please confirm the following before marking the PR as ready for review:
nox -s pre-commitnox -s testsnox -s doctests