Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
TST: simplify mask in pcolor writing to mask test#26273
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Perhaps we should just merge to fix CI, but it would be good if@greglucas looked this over, maybe as a follow-on issue... |
I think@greglucas is away this week, but the explanation in the description makes sense to me. |
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. |
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.
pcolor
therefore needs to work out the locations of the box corners. In this case, every other column of X and Y were masked, sopcolor
can't reasonably be expected to do that.It previously passed because our use of
np.hstack
stripped 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 infff2a79
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
True
orFalse
.PR checklist