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

Specify the behavior of clip() when one of the operands is nan #813

Open asmeurer opened 3 weeks ago

asmeurer commented 3 weeks ago

This follows the NumPy behavior, where the result is nan if any operand is nan. I checked PyTorch and it seems to do this as well.