Open tlnagy opened 4 years ago
Not sure how to fix this, but here is another example, and another related error:
x = AxisArray(rand(3,4)) # no errors with x = rand(3,4)
v = view(x, :, 1:2)
b = rand(6) .> 0.5 # BitArray{1}
v[b]
view(v, b) # BoundsError: attempt to access 3×2 view(::Array{Float64,2}, :, 1:2) with eltype Float64 at index [[3, 5, 6], Base.Slice(Base.OneTo(2))]
m = rand(3,2) .> 0.5 # BitArray{2}
v[m]
view(v, m) # StackOverflowError, view(::AxisArray
while a copy operation leads to the correct behavior:
The same operation on standard Julia arrays works as expected, this is using
AxisArrays v0.4.2