-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix #4076. Change how result is stored in point_in_path/point_on_path. #4087
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
Conversation
def test_picking(): | ||
fig, ax = plt.subplots() | ||
col = ax.scatter([0], [0], [1000]) | ||
fig.savefig("/home/mdboom/test.png", dpi=fig.dpi) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Detritus from earlier testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. Oops. Fixed now.
10955d7
to
095699e
Compare
…nt_on_path. Return indices as signed integers (since that's what Numpy wants).
0abf2cb
to
0a5eea4
Compare
This is passing tests, and ready for final review. |
Are there likely side effects without test coverage? |
@@ -209,7 +209,7 @@ inline void points_in_path(PointArray &points, | |||
typedef agg::conv_contour<curve_t> contour_t; | |||
|
|||
size_t i; | |||
for (i = 0; i < result.size(); ++i) { | |||
for (i = 0; i < points.size(); ++i) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looping over result
seems safer without a check that they are the same size.
@efiring: I think this was merely broken by the C++ refactor, and the algorithm itself hasn't changed at all, so I think the opportunity for side effects is low: it's sort of binary works/doesn't work. This PR does add a basic test for this functionality that never existed before just to make sure it doesn't break again. |
Fix #4076. Change how result is stored in point_in_path/point_on_path.
Return indices as signed integers (since that's what Numpy wants).