Skip to content

Commit

Permalink
Fix WCopula sampling issue (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
lrnv authored Sep 21, 2024
1 parent 5aa54b5 commit a10edf2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ArchimedeanCopula.jl
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ end
function Distributions._rand!(rng::Distributions.AbstractRNG, ::ArchimedeanCopula{d,WGenerator}, x::AbstractVector{T}) where {d,T<:Real}
@assert d==2
x[1] = rand(rng)
x[2] = 1-x[1]
x[2] = 1-x[1]
return x
end
function Distributions._rand!(rng::Distributions.AbstractRNG, ::ArchimedeanCopula{d,IndependentGenerator}, A::DenseMatrix{T}) where {T<:Real, d}
Random.rand!(rng,A)
Expand Down

0 comments on commit a10edf2

Please sign in to comment.