From 499f2953003a7d7e638a9dbb2f01fb83ab9696dd Mon Sep 17 00:00:00 2001 From: David Widmann Date: Thu, 30 Jun 2022 21:03:14 +0200 Subject: [PATCH] Remove implementations of `logpdf_with_trans` for `NoDist` (#1849) * Remove implementations of `logpdf_with_trans` for `NoDist` * Update Project.toml --- Project.toml | 2 +- src/stdlib/distributions.jl | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/Project.toml b/Project.toml index 157ea2ece..c0fd6861c 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Turing" uuid = "fce5fe82-541a-59a6-adf8-730c64b5f9a0" -version = "0.21.7" +version = "0.21.8" [deps] AbstractMCMC = "80f14c24-f653-4e6a-9b94-39d6b0f70001" diff --git a/src/stdlib/distributions.jl b/src/stdlib/distributions.jl index df6de50e2..557445127 100644 --- a/src/stdlib/distributions.jl +++ b/src/stdlib/distributions.jl @@ -244,10 +244,3 @@ Distributions.logpdf(d::LogPoisson, k::Real) = _logpdf(d, k) Base.rand(rng::Random.AbstractRNG, d::LogPoisson) = rand(rng, Poisson(d.λ)) Distributions.sampler(d::LogPoisson) = sampler(Poisson(d.λ)) - -Bijectors.logpdf_with_trans(d::NoDist{<:Univariate}, ::Real, ::Bool) = 0 -Bijectors.logpdf_with_trans(d::NoDist{<:Multivariate}, ::AbstractVector{<:Real}, ::Bool) = 0 -function Bijectors.logpdf_with_trans(d::NoDist{<:Multivariate}, x::AbstractMatrix{<:Real}, ::Bool) - return zeros(Int, size(x, 2)) -end -Bijectors.logpdf_with_trans(d::NoDist{<:Matrixvariate}, ::AbstractMatrix{<:Real}, ::Bool) = 0