Assorted improvements to Cube.intersection#4363
Conversation
|
https://scitools-iris.readthedocs.io/en/stable/developers_guide/documenting/whats_new_contributions.html (in case you've not seen it) has some advice on which What's new category to got for - and mentions that you can go for multiple. I'd suggest that maybe adding |
|
Ah! Evidently I missed the "several categories may be used" part... |
75163b8 to
60cd0f5
Compare
wjbenfold
left a comment
There was a problem hiding this comment.
Thanks for this PR, it's great to have new contributors and your changes are not only improvements, they're also significantly easier to understand.
I've popped some comments on specific lines, please let me know if anything isn't clear or if you disagree (you've definitely got more context than me on how this code is used so there may well be reasons I've missed).
60cd0f5 to
76fd161
Compare
There was a problem hiding this comment.
Excellent work @bsherratt and @wjbenfold, thanks so much for taking this on - a big improvement.
@wjbenfold has taken me through the changes and the conversation, and I'm happy to merge. But first @bsherratt please take a look my single comment to make sure you get the recognition you deserve (it helps nurture our community spirit!).
🚀 Pull Request
Description
The first concern was that the documentation is not sufficiently specific. I think two key questions users will want answered when they read it are:
From the code, it looks like the answers are, respectively:
ignore_bounds, potentially taking a point out of the requested range (as in cube.intersection() returns points outside range due to bounds even when ignore_bounds is True #3698).Instead of simply documenting those quirks, I've tried to fix them. I also introduced a
thresholdargument, so that the answer to "how much overlap" is "configurable" instead of "0".Consult Iris pull request check list