| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
While at it, float `correction` seems to be supported, at least with torch 2.10?
There was a problem hiding this comment.
This PR updates the PyTorch Array API compatibility aliases to better align std()/var() behavior with complex inputs and (intended) floating-point correction handling.
Changes:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
| # Note, float correction is not supported | ||
| # https://github.com/pytorch/pytorch/issues/61492. We don't try to | ||
| # implement it here for now. | ||
|
|
||
| if isinstance(correction, float): | ||
| _correction = int(correction) | ||
| if correction != _correction: | ||
| raise NotImplementedError("float correction in torch std() is not yet supported") | ||
| else: | ||
| _correction = correction | ||
| #if isinstance(correction, float): | ||
| # _correction = int(correction) | ||
| # if correction != _correction: | ||
| # raise NotImplementedError("float correction in torch std() is not yet supported") | ||
| #else: | ||
| # _correction = correction | ||
| _correction = correction |
| Back | FazBrowse Home | New Git URL |
While at it, float correction seems to be supported, at least with torch 2.10?
cross-ref data-apis/array-api#1007, data-apis/array-api-tests#437