Skip to content

Commit

Permalink
fixing imports
Browse files Browse the repository at this point in the history
  • Loading branch information
ralberd committed Jan 14, 2024
1 parent 2b15305 commit 65732b3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions optimism/inverse/test/FiniteDifferenceFixture.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from optimism.test.MeshFixture import *
from optimism.test.MeshFixture import MeshFixture
from collections import namedtuple
import numpy
import numpy as np

class FiniteDifferenceFixture(MeshFixture):
def assertFiniteDifferenceCheckHasVShape(self, errors, tolerance=1e-6):
Expand All @@ -11,9 +11,9 @@ def assertFiniteDifferenceCheckHasVShape(self, errors, tolerance=1e-6):

def build_direction_vector(self, numDesignVars, seed=123):

numpy.random.seed(seed)
directionVector = numpy.random.uniform(-1.0, 1.0, numDesignVars)
normVector = directionVector / numpy.linalg.norm(directionVector)
np.random.seed(seed)
directionVector = np.random.uniform(-1.0, 1.0, numDesignVars)
normVector = directionVector / np.linalg.norm(directionVector)

return np.array(normVector)

Expand Down

0 comments on commit 65732b3

Please sign in to comment.