@@ -298,7 +298,7 @@ def test_equal(l1, l2):
298
298
for function in [f , f_vec ]:
299
299
learner = Learner1D (function , bounds = (- 1 , 1 ))
300
300
learner2 = Learner1D (function , bounds = (- 1 , 1 ))
301
- simple (learner , goal = lambda l : l . npoints > 200 )
301
+ simple (learner , goal = 200 )
302
302
xs , ys = zip (* learner .data .items ())
303
303
304
304
# Make the scale huge to no get a scale doubling
@@ -374,7 +374,7 @@ def f(x):
374
374
loss = curvature_loss_function ()
375
375
assert loss .nth_neighbors == 1
376
376
learner = Learner1D (f , (- 1 , 1 ), loss_per_interval = loss )
377
- simple (learner , goal = lambda l : l . npoints > 100 )
377
+ simple (learner , goal = 100 )
378
378
assert learner .npoints > 100
379
379
380
380
@@ -385,7 +385,7 @@ def f(x):
385
385
loss = curvature_loss_function ()
386
386
assert loss .nth_neighbors == 1
387
387
learner = Learner1D (f , (- 1 , 1 ), loss_per_interval = loss )
388
- simple (learner , goal = lambda l : l . npoints > 100 )
388
+ simple (learner , goal = 100 )
389
389
assert learner .npoints > 100
390
390
391
391
@@ -398,7 +398,7 @@ def f(x):
398
398
return x + a ** 2 / (a ** 2 + x ** 2 )
399
399
400
400
learner = Learner1D (f , bounds = (- 1 , 1 ))
401
- simple (learner , lambda l : l . npoints > 100 )
401
+ simple (learner , 100 )
402
402
403
403
404
404
def test_inf_loss_with_missing_bounds ():
@@ -408,6 +408,6 @@ def test_inf_loss_with_missing_bounds():
408
408
loss_per_interval = curvature_loss_function (),
409
409
)
410
410
# must be done in parallel because otherwise the bounds will be evaluated first
411
- BlockingRunner (learner , goal = lambda learner : learner . loss () < 0.01 )
411
+ BlockingRunner (learner , goal = 0.01 )
412
412
413
413
learner .npoints > 20
0 commit comments