ChainRulesCore.jl
ChainRulesCore.jl copied to clipboard
`ProjectTo(::AbstractSparseMatrix{Bool})` should be trivial
From https://github.com/FluxML/Zygote.jl/issues/1428, these two should make the same ProjectTo{NoTangent}():
julia> using ChainRulesCore, SparseArrays
julia> ProjectTo(diagm([true, false]))
ProjectTo{NoTangent}()
julia> ProjectTo(spdiagm([true, false]))
ProjectTo{SparseMatrixCSC}(element = ProjectTo{NoTangent}(), axes = (Base.OneTo(2), Base.OneTo(2)), rowval = [1, 2], nzranges = UnitRange{Int64}[1:1, 2:2], colptr = [1, 2, 3])