diff --git a/ext/QuaternionicChainRulesCoreExt.jl b/ext/QuaternionicChainRulesCoreExt.jl index 117e7cf..44eb1ee 100644 --- a/ext/QuaternionicChainRulesCoreExt.jl +++ b/ext/QuaternionicChainRulesCoreExt.jl @@ -12,7 +12,10 @@ isdefined(Base, :get_extension) ? # It's likely that StaticArrays will have its own ChainRulesCore extension someday, so we # need to check if there is already a ProjectTo defined for SArray. If so, we'll use that. # If not, we'll define one here. +@info [repr(method) for method in methods(ProjectTo) if occursin("SArray", repr(method.sig))] +@show any(method->occursin("SArray", repr(method.sig)), methods(ProjectTo)) if !any(method->occursin("SArray", repr(method.sig)), methods(ProjectTo)) + @info "Defining ProjectTo for SArray" # These are ripped from https://github.com/JuliaArrays/StaticArrays.jl/pull/1068 function (project::ProjectTo{<:Tangent{<:Tuple}})(dx::SArray) dy = reshape(dx, axes(project.elements)) # allows for dx::OffsetArray