getindex.(z,Ref(1:2)) will work — you need to tell it not to broadcast over the 1:2 array.
6 Likes
getindex.(z,Ref(1:2)) will work — you need to tell it not to broadcast over the 1:2 array.