Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/ApproximateGPs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@

include("TestUtils.jl")

import ChainRulesCore: ProjectTo, Tangent
using PDMats: ScalMat
ProjectTo(x::T) where {T<:ScalMat} = ProjectTo{T}(; dim=x.dim, value=ProjectTo(x.value))
(pr::ProjectTo{<:ScalMat})(dx::ScalMat) = ScalMat(pr.dim, pr.value(dx.value))
(pr::ProjectTo{<:ScalMat})(dx::Tangent{<:ScalMat}) = ScalMat(pr.dim, pr.value(dx.value))

Check warning on line 30 in src/ApproximateGPs.jl

View check run for this annotation

Codecov / codecov/patch

src/ApproximateGPs.jl#L28-L30

Added lines #L28 - L30 were not covered by tests

end