data-apis / array-api

RFC document, tooling and other content related to the array API standard
https://data-apis.github.io/array-api/latest/
MIT License
204 stars 42 forks source link

Allow clip to have int min or max when x is floating-point #811

Open asmeurer opened 4 weeks ago

asmeurer commented 4 weeks ago

This is for consistency with operators, which allow combining an int with an array that has a floating-point data type.

See the discussion at #807.

I also mentioned this at the meeting last week.

asmeurer commented 4 weeks ago

I also made it clearer that if all three arguments are arrays then there is a three-way broadcast.

asmeurer commented 4 weeks ago

Note that if we decide to fix #807 more generally we may want to just remove the specific language for promotion behavior for Python scalars from clip and fold it into the type promotion page (which would also imply this change).