Skip to content

Commit a5c7cbb

Browse files
committed
change ranges of random parameters
1 parent 11a29d2 commit a5c7cbb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adaptive/tests/test_learners.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def maybe_skip(learner):
110110

111111

112112
@learn_with(Learner1D, bounds=(-1, 1))
113-
def quadratic(x, m: uniform(0, 10), b: uniform(0, 1)):
113+
def quadratic(x, m: uniform(1, 4), b: uniform(0, 1)):
114114
return m * x ** 2 + b
115115

116116

@@ -132,7 +132,7 @@ def ring_of_fire(xy, d: uniform(0.2, 1)):
132132

133133
@learn_with(LearnerND, bounds=((-1, 1), (-1, 1), (-1, 1)))
134134
@learn_with(SequenceLearner, sequence=np.random.rand(1000, 3))
135-
def sphere_of_fire(xyz, d: uniform(0.2, 1)):
135+
def sphere_of_fire(xyz, d: uniform(0.2, 0.5)):
136136
a = 0.2
137137
x, y, z = xyz
138138
return x + math.exp(-((x ** 2 + y ** 2 + z ** 2 - d ** 2) ** 2) / a ** 4) + z ** 2
@@ -141,7 +141,7 @@ def sphere_of_fire(xyz, d: uniform(0.2, 1)):
141141
@learn_with(SequenceLearner, sequence=range(1000))
142142
@learn_with(AverageLearner, rtol=1)
143143
def gaussian(n):
144-
return random.gauss(0, 1)
144+
return random.gauss(1, 1)
145145

146146

147147
# Decorators for tests.

0 commit comments

Comments
 (0)