Skip to content
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

AttributeError: module 'array_api_compat.torch' has no attribute 'repeat' #292

Open
mdhaber opened this issue Mar 31, 2025 · 1 comment
Open

Comments

@mdhaber
Copy link

mdhaber commented Mar 31, 2025

>>> import array_api_compat
>>> array_api_compat.__version__
'1.11.2'
>>> from array_api_compat import torch
>>> torch.repeat
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'array_api_compat.torch' has no attribute 'repeat'
@ev-br
Copy link
Member

ev-br commented Mar 31, 2025

Hm, interesting.

For torch, repeat should forward to repeat_interleave. Hopefully it's just an alias (it is under torch/_numpy at least).

Also worth noting that repeat is not tested for any backend:

$ git grep "test_repeat"
cupy-xfails.txt:array_api_tests/test_manipulation_functions.py::test_repeat
dask-xfails.txt:array_api_tests/test_manipulation_functions.py::test_repeat
numpy-1-21-xfails.txt:array_api_tests/test_manipulation_functions.py::test_repeat
numpy-1-26-xfails.txt:array_api_tests/test_manipulation_functions.py::test_repeat
numpy-dev-xfails.txt:array_api_tests/test_manipulation_functions.py::test_repeat
numpy-xfails.txt:array_api_tests/test_manipulation_functions.py::test_repeat
torch-xfails.txt:array_api_tests/test_manipulation_functions.py::test_repeat

Git blame shows that testing was disabled in #166 without much explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants