Closed
Description
openedon Aug 28, 2016
The code below:
A = rand((5, 5))
b = mean(A, 1) .> 0.5
A[:, b]
produces the following error on julia-0.5.0-rc3:
ERROR: BoundsError: attempt to access 5×5 Array{Float64,2} at index [Colon(),Bool[true true false true false]]
in throw_boundserror(::Array{Float64,2}, ::Tuple{Colon,BitArray{2}}) at .\abstractarray.jl:355
in checkbounds at .\abstractarray.jl:284 [inlined]
in _getindex at .\multidimensional.jl:264 [inlined]
in getindex(::Array{Float64,2}, ::Colon, ::BitArray{2}) at .\abstractarray.jl:752
This used to work on julia 0.4 - is the change intended?
Doing A[:, vec(b)]
works of course.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels