-
Notifications
You must be signed in to change notification settings - Fork 52
clip
: ambiguous wording for scalar min/max
#925
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
Several other things that'd be great to clarify:
|
It does say this one though:
|
I believe we'd just need to remove the sentence:
The type promotion rules governing mixing scalars and arrays already covers the case of scalar |
clip states:
The third point could use rewording in my opinion.
I believe that the intended meaning was that
clip(Array[int64], 1.0)
has unspecified behaviour, as per type promotion rules.However, the wording as it is could be interpreted that
clip(Array[float64], 1)
also has unspecified behaviour, which doesn't make sense to me.Proposal
Change
To
Backporting
As I believe this is only a clarification, it should be backported to previous versions. Note that, unlike most binops, this function has always accepted scalars for min/max and wording was the same in 2023.12.
XREFs
min
andmax
have the same dtype asx
array-api-tests#360The text was updated successfully, but these errors were encountered: