Skip to content

Commit

Permalink
Update src/rulesets/LinearAlgebra/structured.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored Nov 23, 2023
1 parent 9ba86d8 commit ee952df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rulesets/LinearAlgebra/structured.jl
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,9 @@ function rrule(::Type{Tridiagonal}, dl, d, du)
@views function ∇Tridiagonal(∂y)
return (
NoTangent(),
diag(∂y[2:end, 1:(end - 1)]),
diag(∂y, -1),
diag(∂y),
diag(∂y[1:(end - 1), 2:end]),
diag(∂y, 1),
)
end
return y, ∇Tridiagonal
Expand Down

0 comments on commit ee952df

Please sign in to comment.