diff --git a/src/utils.jl b/src/utils.jl index d28697127..844e26f52 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -257,6 +257,8 @@ function reconstruct( return copy(val) end +reconstruct(d::Distribution, val) = deepcopy(val) + # TODO: Implement no-op `reconstruct` for general array variates. reconstruct(d::Distribution, val::AbstractVector) = reconstruct(size(d), val)