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 for issue #997 #998
fix for issue #997 #998
Conversation
I can confirm that this PR solves the issue, and I don't think there are any detrimental side-effects. The PR should ideally include a unit test; something based on the one in the issue request would be fine. Amit, if you need some help putting the test within the mpl unit test framework, let me know (I recently had to do the same for other delaunay changes). |
+1 on the unit test. Also, could you provide some possible insight of when/where the results may differ from before? We might want to make some tests to examine those cases as well to evaluate the differences. |
You are right about the unit test, and I and I will be happy to add, but it As for checking differences, I propose trying to make a huge grid (use very
|
@AmitAronovitch : Did you have any progress on this? It is not going to make 1.2.0, but it can still be merged onto master at any point. Thanks, |
My own tests (direct calls to the function) seem to return identical results, but it seems that the existing Delaunay tests (image diffs) fail. I did not find the time to look into that yet (I want to extract the input and output used in these tests, before conversion to colormap, and check them directly). p.s. Should the changeset be rebased/merged to the 1.2.0 branch, or to master? |
Thanks for the update.
You don't need to do either at the moment as your branch would currently merge cleanly into master, but if you do need to update it you should rebase (rather than merge) against master. HTH |
due to points that lie exactly on the boundary.
The fix added in c43a02e allows the delaunay tests to pass cleanly with the proposed cpp patch. The linear_extrapolator inserts nan for points that fall outside of its valid domain. Points that fall exactly on the corners of the specified bounding box may lie on the boundary of that domain, hence they might be considered "outside" in case of tiny rounding errors. The fix avoids this situation by specifying a bounding box that strictly contains all points of the grid. A better fix would be to make the domain of the linear extrapolator strictly contain the bounding box (it currently intersects it at two points). |
For adding a test for this specific issue, should I: a) insert it in test_delaunay.py (reason: localize all delaunay-related tests) or b) create a new file, e.g. test_delaunay_1d_grid.py (reason: it is quite different than the existing tests, and does not fit in their framework). |
Personally, I would prefer it to be in Thanks, |
@pelson Agreed, it should go in |
Added the test, and also published an alternate fix: PR #1477. I did not declare freetype versions in my test, as the other delaunay tests do. I only tested with 2.4.10, and I am not familiar with the possible font issues. Please advise if this might break something. Remaining TODO:
|
see discussion in #997