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

[BUG] broadcast of scalar array in last dimension fails after #1035 #1052

Closed
davidkoski opened this issue Apr 29, 2024 · 0 comments · Fixed by #1053
Closed

[BUG] broadcast of scalar array in last dimension fails after #1035 #1052

davidkoski opened this issue Apr 29, 2024 · 0 comments · Fixed by #1053

Comments

@davidkoski
Copy link
Contributor

Describe the bug
broadcast of scalar array in last dimension fails after #1035

To Reproduce

Include code snippet

>>> import mlx.core as mx
>>> a = mx.zeros([2, 3, 4, 5, 3])
>>> a[..., 0] = 1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: [expand_dims] Invalid axes 4 for output array with 1 dimensions.

Expected behavior

This should be able to broadcast the scalar array into the last dimension.

Desktop (please complete the following information):

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

Successfully merging a pull request may close this issue.

1 participant