Skip to content

Commit

Permalink
Merge pull request #501 from mirkoklukas/Type_Signature_Fix
Browse files Browse the repository at this point in the history
Type signature of HeterogeneousMixture, Closes #500
  • Loading branch information
alex-lew committed Mar 15, 2023
2 parents cec0486 + 33c54dc commit 262f96f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modeling_library/mixture.jl
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ Gen.is_discrete(dist::HeterogeneousMixture) = dist.is_discrete

const MIXTURE_WRONG_NUM_COMPONENTS_ERR = "the length of the weights vector does not match the number of mixture components"

function HeterogeneousMixture(distributions::Vector{Distribution{T}}) where {T}
function HeterogeneousMixture(distributions::Vector{D}) where {T, D <: Distribution{T}}
_has_output_grad = true
_has_argument_grads = Bool[true] # weights
_is_discrete = true
Expand Down

0 comments on commit 262f96f

Please sign in to comment.