Describe the bug
mlx fails to update a slice of an array, equivalent in numpy works
(surfaced in mlx-swift, checked with python/numpy as per below)
suspected bug in mlx::core
Edit: perhaps related to #1015
To Reproduce
in mlx:
import mlx.core as mx
a = mx.ones([2,6,6,6])
b = mx.zeros([3,4,4,4])
b[0,0:4,3,0:4] = a[0,1:5, 5,1:5]
# ValueError: Cannot broadcast array of shape (4,4) into shape (1,4,1,4).
Expected behavior
in numpy:
import numpy as np
a = np.ones([2,6,6,6])
b = np.zeros([3,4,4,4])
b[0,0:4,3,0:4] = a[0,1:5, 5,1:5] #works
np.count_nonzero(b == 1) #16
np.count_nonzero(b == 0) #176
Desktop (please complete the following information):
Describe the bug mlx fails to update a slice of an array, equivalent in numpy works (surfaced in mlx-swift, checked with python/numpy as per below) suspected bug in mlx::core
Edit: perhaps related to #1015
To Reproduce
Expected behavior
Desktop (please complete the following information):
Additional context This slice update also fails in mlx-swift.
Backtrace: