8000 Ignore non-finite vertices when running count_contains by dstansby · Pull Request #8651 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Ignore non-finite vertices when running count_contains #8651

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

Merged
merged 1 commit into from
May 28, 2017

Conversation

dstansby
Copy link
Member

When deciding whether vertices are in a given bounding box, ignore non-finite vertices (ie. np.nan values). The avoids a spurious warning being raised. Fixes #8611.

@dstansby dstansby changed the title Ignore non-finite vetices when running count_contains Ignore non-finite vertices when running count_contains May 21, 2017
@anntzer
Copy link
Contributor
anntzer commented May 21, 2017

I can't reproduce the original issue, and I think the correct fix, if any, would be to manipulate the numpy errstate before the comparison is done.

@tacaswell
Copy link
Member

I agree with @anntzer that this would be better handled by modifying the error state of numpy rather than pre-filtering.

@tacaswell tacaswell added this to the 2.1 (next point release) milestone May 22, 2017
@anntzer
Copy link
Contributor
anntzer commented May 26, 2017

@dstansby can you please provide a repro for the original issue? I still don't see why this patch is even needed (and, if it is needed, I would guess that the errstate probably needs to be adjusted at a gazillion other places as well).

@dstansby
Copy link
Member Author
dstansby commented May 26, 2017 via email

@anntzer
Copy link
Contributor
anntzer commented May 26, 2017

Ah, sorry, I missed the fact that this was only on master. In fact I'm the culprit... c2aabe9 incorrectly removed the errstate manipulation.

@QuLogic QuLogic merged commit 418460b into matplotlib:master May 28, 2017
@dstansby dstansby deleted the nonfinite-verts branch May 28, 2017 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0