Skip to content

Commit

Permalink
use cholesky and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed82008 committed May 14, 2022
1 parent e383164 commit fa148c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "NonconvexSemidefinite"
uuid = "9e21ff56-eb25-42d3-b86f-5b0612f555e7"
authors = ["Mohamed Tarek <[email protected]> and contributors"]
version = "0.1.6"
version = "0.1.7"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Expand Down
4 changes: 2 additions & 2 deletions src/NonconvexSemidefinite.jl
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ catch err
end
function ChainRulesCore.rrule(rc::RuleConfig, ::typeof(safe_logdet), A::AbstractMatrix)
try
return rrule_via_ad(rc, logdet, A)
return rrule_via_ad(rc, A -> logdet(cholesky(A)), A)
catch
-Inf, _ -> (NoTangent(), similar(A) .= NaN)
return -Inf, _ -> (NoTangent(), similar(A) .= NaN)
end
end

Expand Down

2 comments on commit fa148c3

@mohamed82008
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/60239

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.7 -m "<description of version>" fa148c3f9c7444711123daea07f7e449cbd1cbe8
git push origin v0.1.7

Please sign in to comment.