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
Assigning through a bare Ellipsis index fails while reading works #4313
mlx_compute_scatter_args has no matching branch, so a bare Ellipsis falls through the slice / array / int / tuple / None / list cases and hits the final throw.
Only the bare form is affected. Anything that puts the ellipsis inside a tuple takes the mlx_scatter_args_nd path and works fine.
To Reproduce
importmlx.coreasmxa=mx.zeros((2, 3))
a[...] # finea[..., 0] =5# finea[0, ...] =5# finea[..., :] =5# finea[:] =5# finea[None] =5# finea[...] =5# ValueError: Cannot index mlx array using the given type.
docs/src/usage/indexing.rst states that "the ... or :obj:Ellipsis syntax works as in NumPy", and its "Differences from NumPy" note lists exactly two deviations — no bounds checking, and boolean masks being assignment-only. This is not among them, and there is an "In Place Updates" section documenting indexed assignment, so this reads as an omission rather than an intended restriction.
Existing tests only cover Ellipsis inside a tuple (check_slices(..., Ellipsis, ...)) and a bare [...] read, which is why the gap survived.
Activity
Adityaj0 commentedon Aug 16, 2026
PR: #4314