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
Describe the bug
In numpy, np.repeat can accept both int and array type for the repetition. The main use case for passing an array is if each element in the original array needs to repeated a different number of times. Currently, this fails in MLX.
in MlX, this does not work since repetition needs to be an integer.
It would be great if we can add this behavior to mx.repeat unless there is another efficient way to do this.
Thanks
The text was updated successfully, but these errors were encountered:
angeloskath
changed the title
[BUG] mlx.repeat does not behave similary to np.array when repetition is an array
[FEATURE] mx.repeat with variable number of repetitions
Jan 22, 2025
Describe the bug
In numpy,
np.repeat
can accept both int and array type for the repetition. The main use case for passing an array is if each element in the original array needs to repeated a different number of times. Currently, this fails in MLX.To Reproduce
In numpy:
in MlX, this does not work since repetition needs to be an integer.
It would be great if we can add this behavior to
mx.repeat
unless there is another efficient way to do this.Thanks
The text was updated successfully, but these errors were encountered: