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
[BUG] __setitem__ with a bare ellipsis fails to broadcast leading singleton dimensions #4560
☑️ I understand it is strictly prohibited to use AI to write issues.
Describe the bug __setitem__ has inconsistent behavior when using a bare ellipsis. When I attempted to broadcast an array with leading singleton dimensions (for instance (1,3) to a (3,)), __setitem__ threw a value error when using a bare ellipsis (a[...]). However, I don't encounter the same bug if I use a tuple wrapped ellipsis (a[(...,)]) or full slice (a[:]). All three should have consistent behavior.
Expected behavior __setitem__ with a bare ellipsis should have consistent behavior with a full slice or tuple based ellipsis. The leading singleton dimensions should be able to be squeezed since there is no loss of information. So I should be able to do the following:
Additional context
This issue was found when reviewing issue #4358 (now closed). That issue was solved by the earlier fix #4314 raised by the error #4313. This issue can be thought of as a remaining edge case from the original problem addressed by these earlier tickets.
Activity
zcbenz commentedon Oct 1, 2026
Closed by #4561