ENH: test binary functions with python scalars#348
Merged
ev-br merged 4 commits intodata-apis:masterfrom Mar 20, 2025
Merged
Conversation
Member
Author
|
Checked locally: it does catch the error reported in data-apis/array-api-compat#271 |
Member
Author
|
The 2024.12 changelog lists the following binary functions which accept scalars as one of its arguments:
|
2e33674 to
3f24acc
Compare
Member
Author
|
For torch, rejecting scalars is a rule, accepting them is an exception: and Worth noting that I'm not even trying to cover the dtypes. I'm pretty sure a lot of them have missing kernels (uints, complex etc). |
This was referenced Mar 15, 2025
- logical_{and,or,xor}
- atan2, hypot, logaddexp, minimum, maximum
- equal, not_equal, greater, greater_equal, less, less_equal - add, subtract, multiply, divide
- binary_{and,or,xor}
Member
Author
|
Merging to continue improving the 2024.12 coverage. |
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make strides towards the "Scalar support in most functions" rubric of #299
cross-ref data-apis/array-api-compat#271