Skip to content

Commit

Permalink
indentation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronkl committed Aug 23, 2016
1 parent 6f133b8 commit c2c9088
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions robo/test/test_extrapolative_init_design.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,29 @@
from robo.task.base_task import BaseTask
from robo.initial_design.extrapolative_initial_design import extrapolative_initial_design


class DemoTask(BaseTask):

def __init__(self):
X_lower = np.array([0, np.log(10)])
X_upper = np.array([1, np.log(1000)])
self.is_env = np.array([0, 1])
self.is_env = np.array([0, 1])

super(DemoTask, self).__init__(X_lower, X_upper)


class TestEnvInitDesign(unittest.TestCase):

def test(self):
task = DemoTask()
task = DemoTask()
N = 100
X = extrapolative_initial_design(task, N)

assert len(X.shape) == 2
assert X.shape[0] == N
assert X.shape[1] == 2
for i in range(N):
s = np.exp(task.retransform(X[i])[-1])
s = np.exp(task.retransform(X[i])[-1])
assert np.round(s, 0) == np.round(1000. / float(2 ** (i % 4 + 2)), 0)

if __name__ == "__main__":
Expand Down

0 comments on commit c2c9088

Please sign in to comment.