Conversation
… error The axis='value' path already refused rather than reshaping the ensemble, but the message didn't say what to do about it — the fix was only recorded in the method's docstring. Name common_time() in the error itself. Fixes LinkedEarth#703
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.
Fixes #703.
Problem
EnsembleSeries.quantiles(axis='value')requires every member to share a time axis, and correctly refuses rather than silently reshaping the ensemble. But the message doesn't say what to do:The fix is recorded only in the method's own docstring ("You can use the common_time method to do so"), so a user hitting the error has to go read the docs to find it.
Change
Name
common_time()in the error itself:Message-only — the raise condition and every other path are unchanged.
Testing
Added
TestUIEnsembleSeriesQuantiles::test_quantiles_mismatched_time_axes, which builds a two-member ensemble on offset time axes and asserts theValueErrormentionscommon_time. Confirmed it guards the change: with theensembleseries.pyhunk stashed it fails (the old message doesn't match), and passes with it applied.pytest pyleoclim/tests/test_core_EnsembleSeries.py— 30 passed.