Skip to content

Commit

Permalink
Merge pull request #1153 from mileslucas/patch-1
Browse files Browse the repository at this point in the history
Micro improvements on MatrixNormal
  • Loading branch information
johnczito authored Oct 23, 2020
2 parents 6a22a99 + d1253e0 commit 6ccae41
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/matrix/matrixnormal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function _rand!(rng::AbstractRNG, d::MatrixNormal, Y::AbstractMatrix)
X = randn(rng, n, p)
A = cholesky(d.U).L
B = cholesky(d.V).U
Y .= d.M + A * X * B
Y .= d.M .+ A * X * B
end

# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -154,7 +154,7 @@ end

function _rand_params(::Type{MatrixNormal}, elty, n::Int, p::Int)
M = randn(elty, n, p)
U = (X = 2rand(elty, n, n) .- 1; X * X')
V = (Y = 2rand(elty, p, p) .- 1; Y * Y')
U = (X = 2 .* rand(elty, n, n) .- 1; X * X')
V = (Y = 2 .* rand(elty, p, p) .- 1; Y * Y')
return M, U, V
end

0 comments on commit 6ccae41

Please sign in to comment.