-
Notifications
You must be signed in to change notification settings - Fork 285
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
Only try to work out the differences between points for multiple #4367
Only try to work out the differences between points for multiple #4367
Conversation
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.
@wjbenfold Awesome! Thanks for picking up this PR 😄
Just a few minor suggestions to service, and perhaps bolster the iris.tests.unit.util.test__coord_regular.Test_points_step
class with some minimal test coverage?
Then we're good to go 👍
Changes made as requested. Unit tests raised questions of what the correct behaviour with an empty array supplied is. Will rebase then fix whatsnew once @bjlittle is happy with everything else |
@wjbenfold if you change “Fixes issue #4250” to “Fixes #4250” in your original post, it should link it so the issue gets closed automatically when this is merged. See https://docs.github.com/en/[email protected]/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword |
3f97027
to
fe2cb9a
Compare
This looks good to go! I'd like to get it merged. @wjbenfold could I ask you to rebase to resolve the conflicting files? |
fe2cb9a
to
04b388d
Compare
Thanks All for sorting this 😊 |
* main: [pre-commit.ci] pre-commit autoupdate (SciTools#4452) Whatsnew (SciTools#4451) Explicitly define tests so nose can find them (SciTools#4450) Updated environment lockfiles (SciTools#4449) Update CI environment lockfiles (SciTools#4424) Disable GHA workflows on non-SciTools branches (SciTools#4444) Add new contributor to whatsnew (SciTools#4443) Use dask-core instead of dask in ci (SciTools#4434) Mesh recombine (SciTools#4437) Mesh full comparison (SciTools#4439) Only try to work out the differences between points for multiple (SciTools#4367) [pre-commit.ci] pre-commit autoupdate (SciTools#4430) Fix license PyPI classifier (SciTools#4435) Whatsnew for PR SciTools#4367 (SciTools#4440)
* upstream/main: (78 commits) Updated environment lockfiles (SciTools#4458) remove asv package dependency (SciTools#4456) cube.aggregated_by output bounds (SciTools#4315) [pre-commit.ci] pre-commit autoupdate (SciTools#4452) Whatsnew (SciTools#4451) Explicitly define tests so nose can find them (SciTools#4450) Updated environment lockfiles (SciTools#4449) Update CI environment lockfiles (SciTools#4424) Disable GHA workflows on non-SciTools branches (SciTools#4444) Add new contributor to whatsnew (SciTools#4443) Use dask-core instead of dask in ci (SciTools#4434) Mesh recombine (SciTools#4437) Mesh full comparison (SciTools#4439) Only try to work out the differences between points for multiple (SciTools#4367) [pre-commit.ci] pre-commit autoupdate (SciTools#4430) Fix license PyPI classifier (SciTools#4435) Whatsnew for PR SciTools#4367 (SciTools#4440) Suggest type hinting (SciTools#4390) area weight regrid test fixes (SciTools#4432) Update latest.rst (SciTools#4425) ...
🚀 Pull Request
Description
Causes
iris.util.points_step
to check whether there are multiple points to check before trying (thus averting a warning is caused by only one point being provided).Fixes #4250.
Questions for reviewer
coords.from_regular
and thus leave this so that it warns when called with a single point (albeit cryptically) so that people calling it are aware that they may not be doing what they meant? I personally think that the np.nan return value of avdiff (which matches the current behaviour) is sufficient.Consult Iris pull request check list