-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix barbs to accept array of bool for flip_barb
#14296
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0b60674
to
4c6fb47
Compare
Original docstring for barbs() states that it should accept an array of bool for flip_barb, to allow flipping individual barbs for a field. Apparently, this has never worked--this commit fixes that. This is a very important meteorological use case, since barbs should flip in the southern hemisphere.
4c6fb47
to
c87aea3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test for a scalar flip_barb
as well. The broadcasting is non-trivial and should be tested.
Technically, the other tests use the default, which is True. Worth adding one for False? |
Huh? I think the default is False. And executing the flipping logic for the scalar True would be good because the broadcasting is non-trivial. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do have a test of the flip_barb=False
case (as that is the default). I don't think adding a case of testing flip_barb=True
will give us anything that we don't already have (either for the scalar case are showing that barbs can flip).
…296-on-v3.1.x Backport PR #14296 on branch v3.1.x (Fix barbs to accept array of bool for `flip_barb`)
Original docstring for barbs() states that it should accept an array of
bool for flip_barb, to allow flipping individual barbs for a field.
Apparently, this has never worked--this commit fixes that. This
is a very important meteorological use case, since barbs should flip in
the southern hemisphere.
PR Summary
PR Checklist