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] in-place updating of array slice with broadcasting #76

Closed
awni opened this issue Apr 29, 2024 · 2 comments
Closed

[BUG] in-place updating of array slice with broadcasting #76

awni opened this issue Apr 29, 2024 · 2 comments

Comments

@awni
Copy link
Member

awni commented Apr 29, 2024

This was a bug in MLX core that I think got inherited in MLX Swift.

The following should work rather than throwing a broadcast error:

import MLX
let a = MLXArray.ones([2,6,6,6])
let b = MLXArray.zeros([3,4,4,4])
b[0,0..<4, 3, 0..<4] = a[0, 1..<5, 5, 1..<5]

Corresponding PR in MLX: ml-explore/mlx#1035
Corresponding issue in MLX: ml-explore/mlx#1050

@davidkoski
Copy link
Collaborator

While preparing the change I ran into this: ml-explore/mlx#1052

davidkoski added a commit to davidkoski/mlx-swift that referenced this issue Apr 29, 2024
- fix array indexing issue
davidkoski added a commit that referenced this issue May 2, 2024
- fix array indexing issue

* adopt changes from ml-explore/mlx#1053
@davidkoski
Copy link
Collaborator

Closing per #78

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

No branches or pull requests

2 participants