Strictly increasing check with test coverage for streamplot grid#18947
Merged
tacaswell merged 2 commits intomatplotlib:masterfrom Nov 21, 2020
Merged
Strictly increasing check with test coverage for streamplot grid#18947tacaswell merged 2 commits intomatplotlib:masterfrom
tacaswell merged 2 commits intomatplotlib:masterfrom
Conversation
timhoffm
approved these changes
Nov 18, 2020
| y = np.array([[10, 10], [20, 20]]) | ||
|
|
||
| msg = "The rows of 'x' must be equal" | ||
| with pytest.raises(ValueError, match=msg): |
Member
There was a problem hiding this comment.
I'd rather inline the message in the function. Having a separate variable is an unnecessary indirection.
Contributor
Author
There was a problem hiding this comment.
Something like I just pushed?
50c090a to
87638a1
Compare
tacaswell
reviewed
Nov 19, 2020
| x = np.array([0, 10]) | ||
| y = np.array([[[0, 10]]]) | ||
|
|
||
| with pytest.raises(ValueError, match="'y' can have at maximum" |
Member
There was a problem hiding this comment.
Suggested change
| with pytest.raises(ValueError, match="'y' can have at maximum" | |
| with pytest.raises(ValueError, match="'y' can have at maximum " |
87638a1 to
7af5e2c
Compare
Member
|
Thanks @aitikgupta ! Congratulations on your first Matplotlib PR 🎉 , hopefully we will hear from you again! |
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.
PR Summary
This PR fixes #18898, adds check for strictly increasing
xandyinmatplotlib.streamplot.Grid, and adds test coverage for it.PR Checklist
pytestpasses).flake8on changed files to check).flake8-docstringsand runflake8 --docstring-convention=all).doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).