Skip to content

Commit

Permalink
Fix docstring for keepat! (#44128)
Browse files Browse the repository at this point in the history
`keepat!` also works with `BitVector`
  • Loading branch information
bkamins committed Feb 12, 2022
1 parent aad5c1c commit e7f2307
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2586,6 +2586,7 @@ end

"""
keepat!(a::Vector, inds)
keepat!(a::BitVector, inds)
Remove the items at all the indices which are not given by `inds`,
and return the modified `a`.
Expand All @@ -2610,6 +2611,7 @@ keepat!(a::Vector, inds) = _keepat!(a, inds)

"""
keepat!(a::Vector, m::AbstractVector{Bool})
keepat!(a::BitVector, m::AbstractVector{Bool})
The in-place version of logical indexing `a = a[m]`. That is, `keepat!(a, m)` on
vectors of equal length `a` and `m` will remove all elements from `a` for which
Expand Down

0 comments on commit e7f2307

Please sign in to comment.