@@ -429,36 +429,6 @@ for alg in (:HMC, :HMCDA, :NUTS, :SGLD, :SGHMC)
429
429
@eval DynamicPPL. getspace (:: $alg{<:Any, space} ) where {space} = space
430
430
end
431
431
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
462
432
function get_matching_type (
463
433
spl:: Sampler{<:Union{PG, SMC}} ,
464
434
vi,
0 commit comments