Skip to content

Commit

Permalink
fix: return the result always
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Sep 23, 2024
1 parent 229b69d commit b4d8029
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/SciMLJacobianOperators/src/SciMLJacobianOperators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,17 @@ function (op::JacobianOperator)(Jv, v, u, p)
if op.mode isa VJP
if SciMLBase.isinplace(op)
op.vjp_op(Jv, v, u, p)
return
else
copyto!(Jv, op.vjp_op(v, u, p))
end
copyto!(Jv, op.vjp_op(v, u, p))
return
else
if SciMLBase.isinplace(op)
op.jvp_op(Jv, v, u, p)
return
else
copyto!(Jv, op.jvp_op(v, u, p))
end
copyto!(Jv, op.jvp_op(v, u, p))
return
end
return Jv
end

"""
Expand Down

0 comments on commit b4d8029

Please sign in to comment.