Skip to content

Commit de76bd6

Browse files
Update lib/SciMLJacobianOperators/src/SciMLJacobianOperators.jl
1 parent 5a1de80 commit de76bd6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/SciMLJacobianOperators/src/SciMLJacobianOperators.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -410,24 +410,24 @@ function Base.copy(J::JacobianOperator)
410410
J.jvp_op,
411411
J.vjp_op,
412412
copy(J.size),
413-
isnothing(J.input_cache) ? nothing : copy(J.input_cache),
414-
isnothing(J.output_cache) ? nohting : copy(J.output_cache)
413+
J.input_cache === nothing ? nothing : copy(J.input_cache),
414+
J.output_cache === nothing ? nohting : copy(J.output_cache)
415415
)
416416
end
417417

418418
function Base.copy(J::StatefulJacobianOperator)
419419
return StatefulJacobianOperator(
420420
copy(J.jac_op),
421-
isnothing(J.u) ? nothing : copy(J.u),
422-
isnothing(J.p) ? nothing : copy(J.p)
421+
J.u === nothing ? nothing : copy(J.u),
422+
J.p === nothing ? nothing : copy(J.p)
423423
)
424424
end
425425

426426
function Base.copy(J::StatefulJacobianNormalFormOperator)
427427
return StatefulJacobianNormalFormOperator(
428-
isnothing(J.vjp_operator) ? nothing : copy(J.vjp_operator),
429-
isnothing(J.jvp_operator) ? nothing : copy(J.jvp_operator),
430-
isnothing(J.cache) ? nothing : copy(J.cache)
428+
J.vjp_operator === nothing ? nothing : copy(J.vjp_operator),
429+
J.jvp_operator === nothing ? nothing : copy(J.jvp_operator),
430+
J.cache === nothing ? nothing : copy(J.cache)
431431
)
432432

433433
end

0 commit comments

Comments
 (0)