Skip to content

Commit

Permalink
Fix oversight in function type dispatches
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjradcliffe committed May 5, 2024
1 parent 716b671 commit 58133ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/with_logabsdet_jacobian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
dlog1mlogistic(x) = -logistic(x)
dlogitexp(x) = inv(1 - exp(x))
dlogit1mexp(x) = -inv(1 - exp(x))
derivative(::Type{loglogistic}, x) = dloglogistic(x)
derivative(::Type{log1mlogistic}, x) = dlog1mlogistic(x)
derivative(::Type{logitexp}, x) = dlogitexp(x)
derivative(::Type{logit1mexp}, x) = dlogit1mexp(x)
derivative(f::typeof(loglogistic), x) = dloglogistic(x)
derivative(f::typeof(log1mlogistic), x) = dlog1mlogistic(x)
derivative(f::typeof(logitexp), x) = dlogitexp(x)
derivative(f::typeof(logit1mexp), x) = dlogit1mexp(x)

ChangesOfVariables.test_with_logabsdet_jacobian(loglogistic, x, derivative)
ChangesOfVariables.test_with_logabsdet_jacobian(logitexp, -x, derivative)
Expand Down

0 comments on commit 58133ad

Please sign in to comment.