You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gen's HeterogeneousMixture expects Vector{Distribution{T}} and doesn't know what to do with Vector{D} where D "inherits" from Distribution{T}. Note that feeding [uniform, normal] is fine since it is converted to the common "supertype" and is treated as Vector{Distribution{T}}. However [D(),D()] is treated as Vector{D}.
This is an issue when you use GenDistributions.jl's DistributionsBacked or my PushForward type for instance.
The signature should be changed as follows:
# Current signatureHeterogeneousMixture(distributions::Vector{Distribution{T}}) where {T}
# Better signature, solving the issue.HeterogeneousMixture(distributions::Vector{D}) where {T, D <:Distribution{T}}
The text was updated successfully, but these errors were encountered:
Gen's
HeterogeneousMixture
expectsVector{Distribution{T}}
and doesn't know what to do withVector{D}
whereD
"inherits" fromDistribution{T}
. Note that feeding[uniform, normal]
is fine since it is converted to the common "supertype" and is treated asVector{Distribution{T}}
. However[D(),D()]
is treated asVector{D}
.This is an issue when you use GenDistributions.jl's
DistributionsBacked
or myPushForward
type for instance.The signature should be changed as follows:
The text was updated successfully, but these errors were encountered: