-
Notifications
You must be signed in to change notification settings - Fork 9
where
not following Python scalar promotion rules?
#131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
So the relevant wording from the spec is:
so indeed |
What I do wonder though is that
This was definitely discussed and rejected (at a guess, it's granularity of floating point numbers gets larger than 1 at the end for values >> 1). Anyhow, it's covered by "A conforming implementation of the array API standard may support additional type promotion rules beyond those described in this specification." |
Well it's easiest to just fix it, now that I very recently worked on a similar support for other binary functions, and still remember the details. gh-132 seems to do the trick. |
I also ran into: import array_api_strict as xp
xp.where(xp.asarray([True, False]), 1., xp.asarray([2, 2], dtype=xp.float32)
Array([1., 2.], dtype=array_api_strict.float64) # should be float32 Will gh-132 also fix this? |
Yes. It basically makes
|
Thanks. I think I am able to remove all the test skips related to this issue now. |
According to the standard for
where
,array_api_strict.where
does not seem to implement this rule.The text was updated successfully, but these errors were encountered: