Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Warn on non-increasing/decreasing pcolor coords#18398
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
pcolor* will now automatically calculate bin edges for usersif shading is 'auto' or 'nearest'. This can lead to surprisingresulting edge calculations if the coordinate arrays are notsorted prior to calling the function.
if not (np.all(dX >= 0) or np.all(dX <= 0)): | ||
cbook._warn_external( | ||
f"The input coordinates to {funcname} are " | ||
"not all either increasing or decreasing, " |
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.
After writing the PR. Maybe "sorted" is a better word to use here? I'm open to suggestions about the text.
I'm not sure if putting a warning in, when we are planning to remove it, is necessarily a good idea? |
Good question I'm not sure either. Are you also certain you'll change the behavior for 3.4? This would have made the issue in#18317 much more obvious where things were going wrong right from the beginning, so it is just a nice to have, not critical at all. |
I'm going to close this for now and assume something will supersede it in the 3.4 release. |
Can we reopen it just so we can know we need to fix this? If something supersedes it we can just close this then? Thanks! |
Was this intentionally milestoned to 3.2.3? |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon! If these instruction are inaccurate, feel free tosuggest an improvement. |
Nope, should have been 3.3.2 |
jklymak commentedSep 14, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@meeseeksdev backport v3.3.2 |
The existing backport PR is good. |
Hmmm, actually, based on the call, I'd have rephrased this a bit.... |
See#18483 |
…398-on-v3.3.xBackport PR#18398 on branch v3.3.x (Warn on non-increasing/decreasing pcolor coords)
PR Summary
pcolor* will now automatically calculate bin edges for users if shading is 'auto' or 'nearest'. This can lead to surprising resulting edge calculations if the coordinate arrays are not sorted prior to calling the function.
Addresses part of#18317. This would be good to get into v3.3.2 for at least warning users about this use case and then leave the other potential screen-space interpolations for v3.4.
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
andpydocstyle<4
and runflake8 --docstring-convention=all
).