Skip to content

Commit

Permalink
Re-enable support for indexing with linear logical masks
Browse files Browse the repository at this point in the history
Fixes the test failure accidentally introduced in JuliaLang#19730
  • Loading branch information
mbauman committed Jan 13, 2017
1 parent fd14951 commit 383ab70
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions base/multidimensional.jl
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ end
IA1, IArest = IteratorsMD.split(IA, Val{N})
checkindex(Bool, IA1, I[1])
end
@inline checkbounds{T,B<:AbstractArray{Bool,1}}(::Type{Bool}, A::AbstractArray, I::LogicalIndex{T,B}) = linearindices(A) == linearindices(I.mask)
@inline checkbounds(::Type{Bool}, A::AbstractArray, I::LogicalIndex) = indices(A) == indices(I.mask)
@inline checkindex(::Type{Bool}, indx::AbstractUnitRange, I::LogicalIndex) = (indx,) == indices(I.mask)
checkindex(::Type{Bool}, inds::Tuple, I::LogicalIndex) = false
Expand Down

0 comments on commit 383ab70

Please sign in to comment.