Skip to content

Commit d854085

Browse files
committed
Tidying
1 parent bb8781a commit d854085

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

pyadjoint/adjfloat.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,10 @@ def evaluate_hessian_component(self, inputs, hessian_inputs, adj_inputs, block_v
104104
hessian_input, = hessian_inputs
105105
adj_input, = adj_inputs
106106
val = self._operator.codegen(diff=(idx,))(*inputs) * hessian_input
107-
if adj_input is not None:
108-
for idx1, dep in relevant_dependencies:
109-
tlm_input = dep.tlm_value
110-
if tlm_input is not None:
111-
val += self._operator.codegen(diff=(idx, idx1))(*inputs) * adj_input * tlm_input
107+
for idx1, dep in relevant_dependencies:
108+
tlm_input = dep.tlm_value
109+
if tlm_input is not None:
110+
val += self._operator.codegen(diff=(idx, idx1))(*inputs) * adj_input * tlm_input
112111
return val
113112

114113
def recompute_component(self, inputs, block_variable, idx, prepared):

0 commit comments

Comments
 (0)