Skip to content

Commit a275f1f

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

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/rulesets/LinearAlgebra/structured.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,12 @@ end
276276
function rrule(::Type{Tridiagonal}, dl, d, du)
277277
y = Tridiagonal(dl, d, du)
278278
@views function ∇Tridiagonal(∂y)
279-
return (NoTangent(), diag(∂y[2:end, 1:(end - 1)]), diag(∂y),
280-
diag(∂y[1:(end - 1), 2:end]))
279+
return (
280+
NoTangent(),
281+
diag(∂y[2:end, 1:(end - 1)]),
282+
diag(∂y),
283+
diag(∂y[1:(end - 1), 2:end]),
284+
)
281285
end
282286
return y, ∇Tridiagonal
283287
end

0 commit comments

Comments
 (0)