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
205 stars 42 forks source link

Change dtype=None behavior in sum/prod/cumulative_sum/linalg.trace #744

Closed rgommers closed 4 months ago

rgommers commented 4 months ago

Closes gh-731. This is a backwards-incompatible change. It seems justified and necessary because array libraries all behave like the required behavior described in this commit, are not planning to change, and the initial rationale for the "upcast float" requirement wasn't strong. See discussion in gh-731 for more details.

It also improves readability; there were too many bullet points and the indentation wasn't working. The explanation of behavior for dtype=None is almost halved in size, making it much easier to understand.