Skip to content

Commit f612f3f

Browse files
committed
fix semicircle for Julia 1.1 and 1.0
1 parent c2365c2 commit f612f3f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/univariate.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ ZygoteRules.@adjoint function Distributions.Uniform(args...)
5353
end
5454

5555
## Beta ##
56+
5657
function _betalogpdfgrad(α, β, x)
5758
di = digamma+ β)
5859
= log(x) - digamma(α) + di
@@ -139,6 +140,9 @@ Tracker.@grad function semicirclelogpdf(r, x)
139140
(f ? Δ*(-2/rr + rr/diffsq) : n, f ? Δ*(-xx/diffsq) : n)
140141
end
141142
end
143+
if VERSION < v"1.2"
144+
Base.inv(::Irrational{:π}) = 1/π
145+
end
142146

143147
## Binomial ##
144148

0 commit comments

Comments
 (0)