Skip to content

Commit

Permalink
force sym/herm back to return Matrix (1.6 inference fix) (#393)
Browse files Browse the repository at this point in the history
* force sym/herm back to return Matrix

* =bump version
  • Loading branch information
oxinabox authored Mar 30, 2021
1 parent 67c106f commit 4e3164a
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,6 +1,6 @@
name = "ChainRules"
uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2"
version = "0.7.55"
version = "0.7.56"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Expand Down
4 changes: 2 additions & 2 deletions src/rulesets/LinearAlgebra/symmetric.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ end
end
end
L, U, D = LowerTriangular(ΔΩ), UpperTriangular(ΔΩ), Diagonal(ΔΩ)
return uplo === :U ? U .+ transpose(L) - D : L .+ transpose(U) - D
return Matrix(uplo === :U ? U .+ transpose(L) - D : L .+ transpose(U) - D)
end

@inline function _hermitian_back(ΔΩ, uplo::Symbol)
Expand All @@ -83,7 +83,7 @@ end
end
end
L, U, rD = LowerTriangular(ΔΩ), UpperTriangular(ΔΩ), real.(Diagonal(ΔΩ))
return uplo === :U ? U .+ L' - rD : L .+ U' - rD
return Matrix(uplo === :U ? U .+ L' - rD : L .+ U' - rD)
end

#####
Expand Down

2 comments on commit 4e3164a

@oxinabox
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/33169

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.7.56 -m "<description of version>" 4e3164a3a48d4da35e0112d30be7ea9dbdaf3920
git push origin v0.7.56

Please sign in to comment.