-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
numpy.clip documentation could be misleading for a_max < a_min #18782
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
Comments
It looks like I would suggest adding a
It would be great to have your contribution. Thanks for pointing out the issue! |
DOC: add note for clip() special case a_min > a_max See #18782
@xamm, awesome work on the docs addition. Can we close this issue now? |
From my side this issue can be closed. I just was not sure if I should do this by myself. |
Thanks again @xamm! We really appreciate your detailed thoughts on this issue. @melissawm, I think we are ready to close this issue. |
@cooperrc if you can't close issues, we have to change that! :) |
Documentation
In the documentation for clip() the return type is defined as:
When a_min is greater than a_max the return values are only defined by a_max:
If a_min is greater than a_max, the description of the return values in the documentation could be misleading, since all values are replaced by a_max.
It might be good to explain this special behavior in the documentation for the case a_max < a_min.
If a change in documentation is desired, I am happy to contribute.
The text was updated successfully, but these errors were encountered: