Skip to content

Commit 43760f5

Browse files
authored
test if hessian_value is none by testing if hessian_value is none (#189)
1 parent 8124b97 commit 43760f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyadjoint/control.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def get_derivative(self, options={}):
5252
return self.control._ad_convert_type(self.block_variable.adj_value, options=options)
5353

5454
def get_hessian(self, options={}):
55-
if self.block_variable.adj_value is None:
55+
if self.block_variable.hessian_value is None:
5656
logging.warning("Hessian value is None, is the functional independent of the control variable?")
5757
return self.control._ad_convert_type(0., options=options)
5858
return self.control._ad_convert_type(self.block_variable.hessian_value, options=options)

0 commit comments

Comments
 (0)