Skip to content

Commit e63e445

Browse files
committed
fix diagonaloperator update
1 parent 2adb43f commit e63e445

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/matrix.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ function DiagonalOperator(diag::AbstractVector;
155155
)
156156

157157
diag_update_func = update_func_isconstant(update_func) ? update_func :
158-
(A, u, p, t; kwargs...) -> (update_func(A.diag, u, p, t; kwargs...); A)
158+
(A, u, p, t; kwargs...) -> update_func(A.diag, u, p, t; kwargs...) |> Diagonal
159159

160160
diag_update_func! = update_func_isconstant(update_func!) ? update_func! :
161-
(A, u, p, t; kwargs...) -> (update_func!(A.diag, u, p, t; kwargs...); A)
161+
(A, u, p, t; kwargs...) -> update_func!(A.diag, u, p, t; kwargs...)
162162

163163
MatrixOperator(Diagonal(diag);
164164
update_func = diag_update_func,

0 commit comments

Comments
 (0)