Skip to content

Commit

Permalink
Use the more efficient reduction sum(log, x) instead of sum(log.(x))
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasnoack committed Sep 13, 2016
1 parent 3526415 commit 9e0ea26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pdiagmat.jl
Expand Up @@ -44,7 +44,7 @@ end
### Algebra

inv(a::PDiagMat) = PDiagMat(a.inv_diag, a.diag)
logdet(a::PDiagMat) = sum(@compat(log.(a.diag)))
logdet(a::PDiagMat) = sum(log, a.diag)
eigmax(a::PDiagMat) = maximum(a.diag)
eigmin(a::PDiagMat) = minimum(a.diag)

Expand Down

0 comments on commit 9e0ea26

Please sign in to comment.