BUG: torch: expand_dims axis is keyword or positional argument#375
Merged
ev-br merged 3 commits intodata-apis:mainfrom Feb 24, 2026
Merged
BUG: torch: expand_dims axis is keyword or positional argument#375ev-br merged 3 commits intodata-apis:mainfrom
ev-br merged 3 commits intodata-apis:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an xfail entry for the test_searchsorted_with_scalars test in dask, which fails because dask does not support scalar arguments to searchsorted. The test will be skipped until proper support is implemented or the issue is resolved.
- Adds xfail for
test_searchsorted_with_scalarsunder a new "2025.12 support" section
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Dask does not allow scalars as arguments to searchsorted:
$ ARRAY_API_TESTS_MODULE=array_api_compat.dask.array pytest array_api_tests/test_searching_functions.py::test_searchsorted_with_scalars --max-examples 500
...
@given(data=st.data())
> def test_searchsorted_with_scalars(data):
^^^
...
# call np.searchsorted for each pair of blocks in a and v
> meta = np.searchsorted(a._meta, v._meta)
^^^^^^^
E AttributeError: 'int' object has no attribute '_meta'
E
E ========== FAILING CODE SNIPPET:
E xp.searchsorted(dask.array<sort, shape=(1,), dtype=uint8, chunksize=(1,), chunktype=numpy.ndarray>, 0, sorter=None, **kw) with kw = {}
E ====================
4d9e3ac to
3ececee
Compare
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.
Also add several skips to make the CI green:
searchsortedscalarsexpand_dimstuple axesisinscalarsDask does not allow scalars as arguments to searchsorted:
Just add an xfail for now.
cross-ref data-apis/array-api-tests#394