Skip to content

Commit 234d290

Browse files
committed
Fix return type of meanexcess when only one integer is passed
1 parent 2f1a304 commit 234d290

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ A few statistics are defined:
7575
```julia
7676
# return statistics
7777
returnlevels(xs)
78+
79+
# mean excess with previous k values
80+
meanexcess(xs, k)
7881
```
7982

8083
## References

src/stats.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ end
3838
3939
Return mean excess of the data `xs` using previous `k` values.
4040
"""
41-
meanexcess(xs::AbstractVector, k::Int) = meanexcess(xs, [k])
41+
meanexcess(xs::AbstractVector, k::Int) = meanexcess(xs, [k])[1]
4242

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

0 commit comments

Comments
 (0)