TST: simplify mask in pcolor writing to mask test#26273
Merged
QuLogic merged 1 commit intomatplotlib:mainfrom Jul 7, 2023
Merged
TST: simplify mask in pcolor writing to mask test#26273QuLogic merged 1 commit intomatplotlib:mainfrom
QuLogic merged 1 commit intomatplotlib:mainfrom
Conversation
jklymak
approved these changes
Jul 7, 2023
Member
|
Perhaps we should just merge to fix CI, but it would be good if @greglucas looked this over, maybe as a follow-on issue... |
QuLogic
approved these changes
Jul 7, 2023
Member
|
I think @greglucas is away this week, but the explanation in the description makes sense to me. |
Contributor
|
I agree with this change. One could argue whether we should take it one step further and raise if we get to the "auto" path and have masked values when we are trying to do any creation of the mesh. I think this seems reasonable for now, and we can reevaluate that later if the need arises. |
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 unbreaks CI by modifying the failing test.
Since the X and Y shape match the Z shape, they represent the centres of the boxes.
pcolortherefore needs to work out the locations of the box corners. In this case, every other column of X and Y were masked, sopcolorcan't reasonably be expected to do that.It previously passed because our use of
np.hstackstripped the mask off, so it was the same as if we'd not added the mask to begin with. For the test data, there were sensible numbers under the mask but this would obviously not be true in general. We now (since #25027) usenp.ma.hstack.matplotlib/lib/matplotlib/axes/_axes.py
Lines 5834 to 5837 in fff2a79
The point of the test is to verify that we don't attempt to write anything back to the input mask (#26230) . It doesn't matter for those purposes which elements are
TrueorFalse.PR checklist