| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Would be nice to add to the agenda of the consortium meeting on Thursday. From the spec I cannot figure out if it is meant to be truly boolean or just truth/falsy (and if so, torch is not conformant) |
Sorry, something went wrong.
And indeed this used to be in the standard, until it was (seemingly accidentally) lost with gh-116, as mentioned above. |
Sorry, something went wrong.
That indeed seems to be completely accidental. I marked this for the 2024 milestone and backporting, will merge soon unless there are more comments, since it looks uncontroversial and caused by a minor editing hiccup only. |
Sorry, something went wrong.
|
Since this should be backported, I believe we can go ahead and do that in this PR. |
Sorry, something went wrong.
Co-authored-by: Athan <kgryte@gmail.com>
There was a problem hiding this comment.
LGTM! Thanks, @lucascolley!
Sorry, something went wrong.
|
As the language uses should, not must, this allows array libraries to support truthy and falsy conditions for reasons of backward compat, and given that this was an editorial oversight, I'll go ahead and merge. |
Sorry, something went wrong.
|
data-apis/array-api-strict#106 implements this in xp-strict |
Sorry, something went wrong.
|
I don't care for the churn, but one day it may be nice spell things always clearly from either implementation or user perspective. The user must pass a boolean (and the implemntation must support it). For the implementation you could suggest that it should reject non-bools if you are opinionated. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Towards data-apis/array-api-extra#49, scipy/scipy#21783
gh-116 removed this detail because it was contained in a type annotation. Unfortunately, that detail hasn't made its way back into the spec yet, which is causing trouble downstream, with array-api-strict supporting non-boolean input, but torch from array-api-compat only supporting boolean input.
cc @ev-br @asmeurer