Skip to content

Commit

Permalink
Add calls to f in test_surface_objectives
Browse files Browse the repository at this point in the history
  • Loading branch information
mbkumar committed Oct 31, 2023
1 parent cc26cc4 commit d018d59
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/geo/test_surface_objectives.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

def taylor_test1(f, df, x, epsilons=None, direction=None):
np.random.seed(1)
f(x)
if direction is None:
direction = np.random.rand(*(x.shape))-0.5
dfx = df(x)@direction
Expand All @@ -39,6 +40,7 @@ def taylor_test2(f, df, d2f, x, epsilons=None, direction1=None, direction2=None)
if direction2 is None:
direction2 = np.random.rand(*(x.shape))-0.5

f(x)
df0 = df(x) @ direction1
d2fval = direction2.T @ d2f(x) @ direction1
if epsilons is None:
Expand Down

0 comments on commit d018d59

Please sign in to comment.