Skip to content

Commit 6f57657

Browse files
committed
Remove case in frule for purely AbstractZero tangent
1 parent d4db011 commit 6f57657

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/extra_rules.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ end
173173

174174
function ChainRules.frule((_, ∂x), ::Type{SArray{S, T, N, L}}, x::NTuple{L,T}) where {S, T, N, L}
175175
#TODO: we really shouldn't actually see the isa(∂x, AbstractZero) case since the frule should be called then
176-
Δx = isa(∂x, AbstractZero) ? ∂x : SArray{S, T, N, L}(ChainRulesCore.backing(∂x))
176+
Δx = SArray{S, T, N, L}(ChainRulesCore.backing(∂x))
177177
SArray{S, T, N, L}(x), Δx
178178
end
179179

0 commit comments

Comments
 (0)