Remove contour warning for "no-valid-levels".#24912
Conversation
If the user explicitly passes a levels array (the default is auto-determined), let's assume that they know what they are doing.
|
This also closes #20203. |
|
Is this comment from @ianthomas23 dealt with? "We should probably add a check for no levels specified by the user for a contour call, as already happens for contourf." |
|
I'm not sure what this really means, but if it's adding a check for |
|
My comment meant that if there is an explicit check for user-specified |
oscargus
left a comment
There was a problem hiding this comment.
I see the point of:
(I could consider keeping the warning for now in the case where the user didn't pass levels but z is uniform throughout, as that's more likely to be a "data-exploration" case.)
but do not have strong opinions enough to claim that it should be there. Seems like a quite safe option though.
|
Let's see what others think here. |
tacaswell
left a comment
There was a problem hiding this comment.
I'm in favor of removing this warning and if we get reports of "all constant and no lines" we can consider putting the warning back in the fully automatic case (and it would make sense to check on the "all constant" case explicitly).
|
Sounds good; this is good to go, then? |
|
Let's get this in for 3.7. |
…912-on-v3.7.x Backport PR #24912 on branch v3.7.x (Remove contour warning for "no-valid-levels".)
If the user explicitly passes a levels array (the default is auto-determined), let's assume that they know what they are doing. Closes #23778.
(I could consider keeping the warning for now in the case where the user didn't pass
levelsbutzis uniform throughout, as that's more likely to be a "data-exploration" case.)PR Summary
PR Checklist
Documentation and Tests
pytestpasses)Release Notes
.. versionadded::directive in the docstring and documented indoc/users/next_whats_new/.. versionchanged::directive in the docstring and documented indoc/api/next_api_changes/next_whats_new/README.rstornext_api_changes/README.rst