Skip to content

Commit 383ab70

Browse files
committed
Re-enable support for indexing with linear logical masks
Fixes the test failure accidentally introduced in JuliaLang#19730
1 parent fd14951 commit 383ab70

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

base/multidimensional.jl

+1
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ end
308308
IA1, IArest = IteratorsMD.split(IA, Val{N})
309309
checkindex(Bool, IA1, I[1])
310310
end
311+
@inline checkbounds{T,B<:AbstractArray{Bool,1}}(::Type{Bool}, A::AbstractArray, I::LogicalIndex{T,B}) = linearindices(A) == linearindices(I.mask)
311312
@inline checkbounds(::Type{Bool}, A::AbstractArray, I::LogicalIndex) = indices(A) == indices(I.mask)
312313
@inline checkindex(::Type{Bool}, indx::AbstractUnitRange, I::LogicalIndex) = (indx,) == indices(I.mask)
313314
checkindex(::Type{Bool}, inds::Tuple, I::LogicalIndex) = false

0 commit comments

Comments
 (0)