Skip to content

Commit

Permalink
Fixed compilation issue according to JuliaStats#11
Browse files Browse the repository at this point in the history
  • Loading branch information
zgornel committed Jan 14, 2019
1 parent 094f2bc commit 229908d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/metrics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,12 @@ function eval_end(dist::RenyiDivergence, s::Tuple{T,T,T,T}) where {T <: Real}
end
end

# Combine docs with RenyiDivergence
@doc (@doc RenyiDivergence) renyi_divergence

# Combine docs with RenyiDivergence.
# Getting the docstring with @doc causes problems with package compilation.
# https://github.com/JuliaStats/Distances.jl/issues/113
let docstring = Base.Docs.getdoc(RenyiDivergence)
@doc docstring renyi_divergence
end
renyi_divergence(a::AbstractArray, b::AbstractArray, q::Real) = evaluate(RenyiDivergence(q), a, b)

# JSDivergence
Expand Down

0 comments on commit 229908d

Please sign in to comment.