Skip to content

Commit

Permalink
Fix return type of meanexcess when only one integer is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
juliohm committed Jul 20, 2018
1 parent 2f1a304 commit 234d290
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ A few statistics are defined:
```julia
# return statistics
returnlevels(xs)

# mean excess with previous k values
meanexcess(xs, k)
```

## References
Expand Down
2 changes: 1 addition & 1 deletion src/stats.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ end
Return mean excess of the data `xs` using previous `k` values.
"""
meanexcess(xs::AbstractVector, k::Int) = meanexcess(xs, [k])
meanexcess(xs::AbstractVector, k::Int) = meanexcess(xs, [k])[1]

function meanexcess(xs::AbstractVector, ks::AbstractVector{Int})
ys = sort(xs, rev=true)
Expand Down

0 comments on commit 234d290

Please sign in to comment.