Skip to content

Commit

Permalink
docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
joshday committed May 1, 2020
1 parent 18c1751 commit 25cb8e5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/stats.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ _merge!(a::Counter, b::Counter) = (a.n += b.n)
Track a dictionary that maps unique values to its number of occurrences. Similar to
`StatsBase.countmap`.
Counts can be incremented by values other than one (and decremented) using the `fit!(::CountMap{T}, ::Pair{T,Int})` method, e.g.
```julia
o = fit!(CountMap(String), ["A", "B"])
fit!(o, "A" => 5)
fit!(o, "A" => -1)
```
# Example
o = fit!(CountMap(Int), rand(1:10, 1000))
Expand Down

2 comments on commit 25cb8e5

@joshday
Copy link
Owner Author

@joshday joshday commented on 25cb8e5 May 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/13968

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.3.1 -m "<description of version>" 25cb8e5e6a79b042e2b860bde003471651225b3c
git push origin v1.3.1

Please sign in to comment.