Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion base/bitarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ function bitcount(Bc::Vector{UInt64}; init::T=0) where {T}
return n
end

count(B::BitArray; init=0) = bitcount(B.chunks; init)
_count(::typeof(identity), B::BitArray, ::Colon, init) = bitcount(B.chunks; init)

function unsafe_bitfindnext(Bc::Vector{UInt64}, start::Int)
chunk_start = _div64(start-1)+1
Expand Down
1 change: 1 addition & 0 deletions test/bitarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1221,6 +1221,7 @@ timesofar("datamove")
end

@test count(trues(2, 2), init=0x03) === 0x07
@test count(trues(2, 2, 2), dims=2) == fill(2, 2, 1, 2)
end

timesofar("find")
Expand Down