Skip to content

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

Merged
jwiggins merged 1 commit into
masterfrom
fix/408
Jul 2, 2018
Merged

FIX: Pass a C-contiguous array to points_in_polygon#409
jwiggins merged 1 commit into
masterfrom
fix/408

Conversation

@jwiggins
Copy link
Copy Markdown
Member

@jwiggins jwiggins commented Jul 2, 2018

Fixes #408

@jwiggins jwiggins requested a review from corranwebster July 2, 2018 08:36
Copy link
Copy Markdown
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
Copy Markdown
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