Skip to content
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

FIX: Pass a C-contiguous array to points_in_polygon #409

Merged
merged 1 commit into from
Jul 2, 2018
Merged

Conversation

jwiggins
Copy link
Member

@jwiggins jwiggins commented Jul 2, 2018

Fixes #408

Copy link
Contributor

@corranwebster corranwebster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Are there other places where we call points_in_polygon that may have similar problems?

@jwiggins
Copy link
Member Author

jwiggins commented Jul 2, 2018

I had the same question. This is the only other call to points_in_polygon:

$ grin points_in_polygon
./chaco/polygon_plot.py:
   12 : from kiva.api import points_in_polygon
  138 :         if points_in_polygon([data_pt], poly)[0] == 1:

It's passing a list, which gets passed through numpy.asarray before constructing a view. I think it should be OK.

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.

2 participants