Skip to content

Commit

Permalink
fix checknumerics
Browse files Browse the repository at this point in the history
  • Loading branch information
xukai92 committed Apr 28, 2019
1 parent ef621ab commit aca9591
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/distributions/beta.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ end
function _u2logkumaraswamysample(T, u, kuma::BatchKumaraswamy)
_one = one(T)
_eps = eps(T)
return log.(_one + _eps .- exp.(log.(u) ./ (kuma.b .+ _eps))) ./ (kuma.a .+ _eps)
return log.(_one .- exp.(log.(u) ./ kuma.b)) ./ kuma.a
end

"""
Expand Down
2 changes: 1 addition & 1 deletion src/scripting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function checknumerics(vcheck, vmonitor...; vcheckname=nothing, vmonitornames=no
for i in eachindex(vcheck)
check = vcheck[i]
if isnan(check) || isinf(check)
ci = CartesianIndices(check)[i]
ci = CartesianIndices(size(vcheck))[i]
Istr = replace(string(ci.I), r"(\s)|(\()|(\))" => "")
if vcheckname != nothing
check = ("($vcheckname[$Istr], $check)")
Expand Down

0 comments on commit aca9591

Please sign in to comment.