Skip to content

Commit 5895736

Browse files
Update src/rulesets/LinearAlgebra/structured.jl
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent ee952df commit 5895736

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/rulesets/LinearAlgebra/structured.jl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,12 +276,7 @@ end
276276
function rrule(::Type{Tridiagonal}, dl, d, du)
277277
y = Tridiagonal(dl, d, du)
278278
@views function ∇Tridiagonal(∂y)
279-
return (
280-
NoTangent(),
281-
diag(∂y, -1),
282-
diag(∂y),
283-
diag(∂y, 1),
284-
)
279+
return (NoTangent(), diag(∂y, -1), diag(∂y), diag(∂y, 1))
285280
end
286281
return y, ∇Tridiagonal
287282
end

0 commit comments

Comments
 (0)