The documentation of CartesianIndex states:
In particular,
A[I]is equivalent toA[i,j,k...]
Currently it does not hold if i etc. is Bool. For example:
julia> x = rand(2,2)
2×2 Array{Float64,2}:
0.937975 0.7768
0.92419 0.502304
julia> x[CartesianIndex(true, true)]
0.9379748299581936
julia> x[true, true]
ERROR: ArgumentError: invalid index: true of type Bool
I think creating CartesianIndex with Bool should be disallowed and Integer in its constructors should be replaced by Union{Signed, Unsigned}, but I wanted to consult this before submitting an issue.