Skip to content

Commit 053a2f7

Browse files
Twin PR to DPPL 191 (#1465)
Co-authored-by: David Widmann <[email protected]>
1 parent f0cb89a commit 053a2f7

File tree

3 files changed

+3
-33
lines changed

3 files changed

+3
-33
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "Turing"
22
uuid = "fce5fe82-541a-59a6-adf8-730c64b5f9a0"
3-
version = "0.15.2"
3+
version = "0.15.3"
44

55
[deps]
66
AbstractMCMC = "80f14c24-f653-4e6a-9b94-39d6b0f70001"
@@ -43,7 +43,7 @@ Bijectors = "0.8"
4343
Distributions = "0.23.3, 0.24"
4444
DistributionsAD = "0.6"
4545
DocStringExtensions = "0.8"
46-
DynamicPPL = "0.10.0"
46+
DynamicPPL = "0.10.2"
4747
EllipticalSliceSampling = "0.3"
4848
ForwardDiff = "0.10.3"
4949
Libtask = "0.4, 0.5"

src/inference/Inference.jl

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -429,36 +429,6 @@ for alg in (:HMC, :HMCDA, :NUTS, :SGLD, :SGHMC)
429429
@eval DynamicPPL.getspace(::$alg{<:Any, space}) where {space} = space
430430
end
431431

432-
floatof(::Type{T}) where {T <: Real} = typeof(one(T)/one(T))
433-
floatof(::Type) = Real # fallback if type inference failed
434-
435-
function get_matching_type(
436-
spl::AbstractSampler,
437-
vi,
438-
::Type{T},
439-
) where {T}
440-
return T
441-
end
442-
function get_matching_type(
443-
spl::AbstractSampler,
444-
vi,
445-
::Type{<:Union{Missing, AbstractFloat}},
446-
)
447-
return Union{Missing, floatof(eltype(vi, spl))}
448-
end
449-
function get_matching_type(
450-
spl::AbstractSampler,
451-
vi,
452-
::Type{<:AbstractFloat},
453-
)
454-
return floatof(eltype(vi, spl))
455-
end
456-
function get_matching_type(spl::AbstractSampler, vi, ::Type{<:Array{T,N}}) where {T,N}
457-
return Array{get_matching_type(spl, vi, T), N}
458-
end
459-
function get_matching_type(spl::AbstractSampler, vi, ::Type{<:Array{T}}) where T
460-
return Array{get_matching_type(spl, vi, T)}
461-
end
462432
function get_matching_type(
463433
spl::Sampler{<:Union{PG, SMC}},
464434
vi,

test/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ CmdStan = "6.0.8"
3737
Distributions = "0.23.8, 0.24"
3838
DistributionsAD = "0.6.3"
3939
DynamicHMC = "2.1.6"
40-
DynamicPPL = "0.10.0"
40+
DynamicPPL = "0.10.2"
4141
FiniteDifferences = "0.10.8, 0.11"
4242
ForwardDiff = "0.10.12"
4343
MCMCChains = "4.0.4"

0 commit comments

Comments
 (0)