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
BUG: complex special case for clip #15643
base: main
Are you sure you want to change the base?
Conversation
This is a big change in behavior, OTOH, I can't see anybody relying on the previous behavior :) @seberg I've tagged this for triage. |
Clip uses minimum and maximum for the 1 parameter version, so I doubt that this covers that part. If nobody relies on it, might as well go through a short futurewarning? |
It wasn't mentioned as a recommended option in the base issue, but maybe just warning on use of clip with complex input is sufficient. |
Is there a actual use case for this? In any case it seems the consensus is for the behaviour to box-clip (separately clip real and imaginary) without touching min/max: the ufunc should not re-use max and min. In any case the proposal should be discussed on the mailing list. |
Thanks @birm, test cases look fine to me. |
@birm Needs a release note, see |
Did we ever decide we actually wanted this? My understanding was we were only able to justify it if we deprecated the comparison on complex numbers which the current behavior is consistent with. Have we done that? |
No, there is a bit of a net of dependencies. Comparison is used in sorting. For sorting we have a solution (i.e. we can add a "sortkey", the code for which is mostly ready). I think my main problem was that |
@birm Needs a rebase. I don't see any reason not to put this in. |
Trying to fix my messes, as ever. I'm not opposed to maintainer changes, but I'll try to fix the tests as best as I can. |
Fixes #15630
Continues #15640
For now, I've just removed tests that didn't work with the clip. I'll re-add and fix them if this is judged to be useful.