Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
QuLogic merged 1 commit intomatplotlib:mainfromrcomer:pcolor-maskwrite
Jul 7, 2023

Conversation

rcomer
Copy link
Member

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 ofnp.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.

hstack=np.ma.hstackifnp.ma.isMA(X)elsenp.hstack
X=hstack((X[:, [0]]-dX[:, [0]],
X[:, :-1]+dX,
X[:, [-1]]+dX[:, [-1]]))

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 areTrue orFalse.

PR checklist

@rcomerrcomer mentioned this pull requestJul 7, 2023
1 task
@rcomerrcomer added this to thev3.8.0 milestoneJul 7, 2023
@jklymakjklymak requested a review fromgreglucasJuly 7, 2023 13:49
@jklymak
Copy link
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...

@QuLogicQuLogic merged commitf7bdfd3 intomatplotlib:mainJul 7, 2023
@QuLogic
Copy link
Member

I think@greglucas is away this week, but the explanation in the description makes sense to me.

@rcomerrcomer deleted the pcolor-maskwrite branchJuly 7, 2023 21:33
@greglucas
Copy link
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.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic approved these changes

@jklymakjklymakjklymak approved these changes

@greglucasgreglucasAwaiting requested review from greglucas

Assignees
No one assigned
Projects
None yet
Milestone
v3.8.0
Development

Successfully merging this pull request may close these issues.

4 participants
@rcomer@jklymak@QuLogic@greglucas

[8]ページ先頭

©2009-2025 Movatter.jp