{{ message }}
BF: ignore CLOSEPOLY after NaN in PathNanRemover - #17885
Merged
QuLogic merged 2 commits intoJul 15, 2020
Merged
Conversation
Member
Contributor
Author
Great question. It leaves it as-is. (Same as previous behavior). >>> p.cleaned(remove_nans=True)
Path(array([[ 0., 0.],
[nan, nan],
[ 0., 0.]]), array([ 1, 79, 0], dtype=uint8))I think this makes sense because
So this PR only changes the behavior when leaving a |
Contributor
Author
|
I'm aware that this doesn't play well with >>> p.cleaned(remove_nans=True, simplify=True)
Path(array([[ 0., 0.],
[nan, nan],
[nan, nan],
[ 0., 0.]]), array([1, 2, 2, 0], dtype=uint8))but this is also existing behavior, and I haven't taken the time to grok the full |
tacaswell
approved these changes
Jul 13, 2020
Contributor
Author
QuLogic
reviewed
Jul 14, 2020
brunobeltran
force-pushed
the
ignore_closepoly_after_nan
branch
from
July 15, 2020 18:12
e90850f to
b95ce02
Compare
QuLogic
force-pushed
the
ignore_closepoly_after_nan
branch
from
July 15, 2020 20:19
b95ce02 to
e216e59
Compare
QuLogic
approved these changes
Jul 15, 2020
QuLogic
left a comment
Member
There was a problem hiding this comment.
I pushed a small whitespace fix.
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Jul 15, 2020
jklymak
added a commit
that referenced
this pull request
Jul 15, 2020
…885-on-v3.3.x Backport PR #17885 on branch v3.3.x (BF: ignore CLOSEPOLY after NaN in PathNanRemover)
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

PR Summary
Fixes #17868.
In short, the current
PathNanRemoveralways keepsCLOSEPOLY"vertices" around, even if they contain NaN. This is arguably okay (since it is documented in comments that the values ofCLOSEPOLYvertices are ignored). However, because of this, if a CLOSEPOLY occurs before any non-NaN segments of a Path are encountered, thenPathNanRemover(and, by proxy,Path.cleaned(remove_nans=True)will return a malformedPaththat starts with aCLOSEPOLY.Current behavior:
New behavior
PR Checklist