Support for element-wise repetitions in mlx.core.repeat #1128
ajithmoola
started this conversation in
Ideas
Replies: 1 comment 4 replies
-
In general MLX does not support operations where the output arrays shape depends on the input arrays data. So the API you are proposing is not so simple to implement. There are some possible alternatives:
Maybe you could say more about your use case to help us understand what would work best. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey,
I've been transitioning my code from JAX to MLX and noticed a potential enhancement that could increase the flexibility of the
mlx.core.repeat
method. Currently, it seems thatmlx.core.repeat
only allows for a single integer to specify repetitions for all elements in the input array. However, it would be incredibly useful to support an array-like object that allows specifying a different repetition count for each element in the input array.I can take a stab at this, if this is not on your roadmap.
Beta Was this translation helpful? Give feedback.
All reactions