You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cupyrepeat does not accept CuPy array for repeats #312
The standard specifies that the second argument of repeat ("repeats") can be an array of integers, but CuPy doesn't support this.
fromarray_api_compatimportcupyasxp# not OK# import array_api_strict as xp # OKx=xp.asarray([1, 2, 3])
xp.repeat(x, x)
# ValueError: cupy.ndaray cannot be specified as `repeats` argument.
The array API documentation of repeats notes:
For specification-conforming array libraries supporting hardware acceleration, providing an array for repeats may cause device synchronization due to an unknown output shape. For those array libraries where synchronization concerns are applicable, conforming array libraries are advised to include a warning in their documentation regarding potential performance degradation when repeats is an array.
From cupy/cupy#3849, I see that this is the case for CuPy. Not sure what that means for this issue. One could argue that CuPy does not support it and that this can be closed.
Activity
ev-br commentedon Apr 19, 2026
cross-ref cupy/cupy#9855 which adds support to CuPy 14.1.0 (released as of May 23, 2026).