Skip to content

Commit

Permalink
Quick-fix for #100 (#101)
Browse files Browse the repository at this point in the history
* fix for #100

* fix link and invlink

Co-authored-by: mohamed82008 <[email protected]>
  • Loading branch information
torfjelde and mohamed82008 authored Apr 7, 2020
1 parent 2746ff9 commit 77cbd05
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/compat/distributionsad.jl
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,28 @@ function link(
dist::VectorOfUnivariate,
x::AbstractMatrix{<:Real},
)
return mapvcat(eachcol(x)) do x
return eachcolmaphcat(x) do x
link(dist, x)
end
end

function invlink(
dist::VectorOfUnivariate,
x::AbstractVector{<:Real},
)
return mapvcat(dist.v, x) do dist, x
invlink(dist, x)
end
end
function invlink(
dist::VectorOfUnivariate,
x::AbstractMatrix{<:Real},
)
return eachcolmaphcat(x) do x
invlink(dist, x)
end
end

function logpdf_with_trans(
dist::MatrixOfUnivariate,
x::AbstractMatrix{<:Real},
Expand Down

0 comments on commit 77cbd05

Please sign in to comment.