From 383ab70e9b10bf00defcc4ecad6bcdd338496ffb Mon Sep 17 00:00:00 2001 From: Matt Bauman Date: Fri, 13 Jan 2017 13:27:09 -0600 Subject: [PATCH] Re-enable support for indexing with linear logical masks Fixes the test failure accidentally introduced in #19730 --- base/multidimensional.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/base/multidimensional.jl b/base/multidimensional.jl index 58d4570b3b6d1..b49d0d72e77e9 100644 --- a/base/multidimensional.jl +++ b/base/multidimensional.jl @@ -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