We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57be075 commit 693147dCopy full SHA for 693147d
src/ApproximateGPs.jl
@@ -23,4 +23,10 @@ include("deprecations.jl")
23
24
include("TestUtils.jl")
25
26
+import ChainRulesCore: ProjectTo, Tangent
27
+using PDMats: ScalMat
28
+ProjectTo(x::T) where T <: ScalMat = ProjectTo{T}(; dim=x.dim, value=ProjectTo(x.value))
29
+(pr::ProjectTo{<:ScalMat})(dx::ScalMat) = ScalMat(pr.dim, pr.value(dx.value))
30
+(pr::ProjectTo{<:ScalMat})(dx::Tangent{<:ScalMat}) = ScalMat(pr.dim, pr.value(dx.value))
31
+
32
end
0 commit comments