Skip to content

Commit

Permalink
Fix edge case: No values in findall
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobnissen committed Dec 26, 2021
1 parent 6453a3b commit 3664ba3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2332,6 +2332,7 @@ end
function _findall(f::Function, A::AbstractArray{Bool})
n = count(f, A)
I = Vector{eltype(keys(A))}(undef, n)
isempty(I) && return I
_findall(f, I, A)
end

Expand Down

0 comments on commit 3664ba3

Please sign in to comment.