Skip to content
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

clip: Document edge cases #472

Closed
m-mohr opened this issue Oct 24, 2023 · 4 comments · Fixed by #477
Closed

clip: Document edge cases #472

m-mohr opened this issue Oct 24, 2023 · 4 comments · Fixed by #477
Milestone

Comments

@m-mohr
Copy link
Member

m-mohr commented Oct 24, 2023

Process ID: clip

Describe the issue:

During the test suite creation, I identified that the clip process doesn't mention what happens if min > max for example.

Proposed solution:
We should check the tests and document what's missing, e.g. throw an error if min > max? Check what similar processes do, e.g. between.

Additional context:
Tests in #468

@m-mohr m-mohr added this to the 2.0.0 milestone Oct 24, 2023
@m-mohr
Copy link
Member Author

m-mohr commented Oct 24, 2023

What have backends impemented? @soxofaan @guss84 @clausmichele @LukeWeidenwalker

@clausmichele
Copy link
Member

In the xarray/dask implementation, if max < min, no error is raised. The base function is provided by numpy, and they explicitly mention this in the docs:
No check is performed to ensure a_min < a_max.

Anyway, we can agree to raise a predefined error if this happens.

@soxofaan
Copy link
Member

I don't think we have a check either.
Specifying to throw an error makes most sense to me too

@m-mohr
Copy link
Member Author

m-mohr commented Oct 25, 2023

PR: #477

@m-mohr m-mohr linked a pull request Oct 25, 2023 that will close this issue
@m-mohr m-mohr closed this as completed Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants